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? Quote 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. Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.