djp1988 Posted May 14, 2008 Share Posted May 14, 2008 Hi, I have a database for animals and I wanted to make the user be able to select a country and the query find which animals I have in my database from these places, but I have a problem sorting out the PHP myslq for this, I would prefer to have only 1 field in the DB with each country seperated by a comma, but how would I query to find out for exemple which animals come from Canada if my field has these values in it:USA, Canada, Mexico??I heard of the split() function but didn't understand it Link to comment Share on other sites More sharing options...
zppblood Posted May 14, 2008 Share Posted May 14, 2008 SELECT animal FROM table WHERE country LIKE '%Canada%' Link to comment Share on other sites More sharing options...
djp1988 Posted May 14, 2008 Author Share Posted May 14, 2008 thank you Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.