Hello guys i want create a table which willl consist of Regions and Location
therefore when i take a region it should give me a list of locations under that region. i hope my question is clear enough THank you
Recommended Answers
Jump to PostA few problems here
- you haven't said what DBMS you are using
- you haven't said what programming language you are using
- you apparently haven't put any effort into this yourself
- you expect us to do this for you with almost zero input
Jump to PostI recently covered something like this in a code snippet:
with a suggested table schema
Have a look at GROUP_CONCAT for creating a list by group, as in
SELECT states.state, GROUP_CONCAT(cities.city) FROM states INNER JOIN cities ON cities.state_id = states.state_id GROUP BY states.state_id
All 6 Replies
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster
Benjamin_4 -3 Junior Poster in Training
RomelynCastillo 0 Newbie Poster
balaji9124 0 Newbie Poster
chocolatte.lavista_1 -3 Newbie Poster

diafol
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.