hansman Posted July 17, 2008 Share Posted July 17, 2008 Hello all, I currently have an input that you type in counties like "Countyname1, countyname2, etc". This is stored in a field in my database. I then pull the data in the field out and use explode() to separate it from the commas. I would like a list of links for each different county, that will show information in that field. If you couldnt understand that i will try differently. i have a table named "AD" In this table i have rows like "name, address, website, county, state" I let the user decide what state they live in, then show them a list of counties that are in that state. The user will then click the county to show a list of names in that certain county. I have gotten this to work no problem when the table has one county in it. I cannot figure out how to get it to worlk with numerout counties in each row and using explode(). Link to comment https://forums.phpfreaks.com/topic/115260-select-query/ Share on other sites More sharing options...
GingerRobot Posted July 17, 2008 Share Posted July 17, 2008 That's because you shouldn't be storing multiple countries in one field. You should add a separate table containing a list of countries. If you're ever considering storing more than one piece of information in a field, you probably need to think about your structure and add a new table. This tutorial might be a good place to start to learn more. Link to comment https://forums.phpfreaks.com/topic/115260-select-query/#findComment-592554 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.