Ryaan Posted February 18, 2007 Share Posted February 18, 2007 So basically what I've got is this $search = mysql_query("SELECT * FROM myPMs WHERE message like \"%$trimmed%\""); But what I want is it to do something such as WHERE message like \"%$trimmed%\" and also WHERE to_user = '$id' So it would be getting two WHERE's. I'm not sure if it's possible, but if it is please let me know how. Thanks, Ryan. Link to comment https://forums.phpfreaks.com/topic/38998-quick-question/ Share on other sites More sharing options...
fert Posted February 18, 2007 Share Posted February 18, 2007 SELECT * FROM `table` WHERE `foo`='bar' AND `bar`='foo' Link to comment https://forums.phpfreaks.com/topic/38998-quick-question/#findComment-187751 Share on other sites More sharing options...
Ryaan Posted February 18, 2007 Author Share Posted February 18, 2007 Ah, I was trying &. Thank you very much. Oh, and is there a point to the ` between every word? Link to comment https://forums.phpfreaks.com/topic/38998-quick-question/#findComment-187753 Share on other sites More sharing options...
fert Posted February 18, 2007 Share Posted February 18, 2007 no, not really Link to comment https://forums.phpfreaks.com/topic/38998-quick-question/#findComment-187755 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.