conman1990 Posted June 7, 2009 Share Posted June 7, 2009 So here's my query: SELECT * FROM `table` WHERE zip = 'xxxxx' AND 'query' IN (string) the only problem is that the "string" is a row in the database with 'query', 'query1', 'query2', etc... Mysql doesn't allow you to use a database row with the IN () I hope this makes sense...basically I have a field in the db with "'xxxx', 'afd', 'akjdf', 'adkjfj', 'etc'" and i'm trying to take a search term 'xxxx' and see if it is in that field. make sense? please help! Is there another query I could use? Link to comment https://forums.phpfreaks.com/topic/161257-help-querying-for-a-term-inside-a-longer-string/ Share on other sites More sharing options...
Ken2k7 Posted June 7, 2009 Share Posted June 7, 2009 You're probably better off using a JOIN statement. Link to comment https://forums.phpfreaks.com/topic/161257-help-querying-for-a-term-inside-a-longer-string/#findComment-851068 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.