gaza165 Posted June 2, 2009 Share Posted June 2, 2009 Is there anyway i can search through my database through an array of items?? <?php $array = array('url','img','b'); $message = mysql_query("SELECT * FROM chat WHERE chat_id = $lastid AND message LIKE '%$array%'"); ?> Link to comment https://forums.phpfreaks.com/topic/160648-sql-like-with-array/ Share on other sites More sharing options...
Ken2k7 Posted June 2, 2009 Share Posted June 2, 2009 MySQL IN? Link to comment https://forums.phpfreaks.com/topic/160648-sql-like-with-array/#findComment-847824 Share on other sites More sharing options...
gaza165 Posted June 2, 2009 Author Share Posted June 2, 2009 can u tell me more please??? Link to comment https://forums.phpfreaks.com/topic/160648-sql-like-with-array/#findComment-847843 Share on other sites More sharing options...
gaza165 Posted June 2, 2009 Author Share Posted June 2, 2009 I am trying to look for these words in a record in my table [url [img [b something like that but this doesnt work $message = mysql_query("SELECT * FROM chat WHERE message IN ('[url','[b','[img') AND chat_id = $lastid "); Link to comment https://forums.phpfreaks.com/topic/160648-sql-like-with-array/#findComment-847857 Share on other sites More sharing options...
Mark Baker Posted June 2, 2009 Share Posted June 2, 2009 See answer in the other thread where you've asked this identical question.... and please restrict yourself to one thread per question in future Link to comment https://forums.phpfreaks.com/topic/160648-sql-like-with-array/#findComment-847901 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.