wmguk Posted March 18, 2009 Share Posted March 18, 2009 Hey, I'm running this script: $sql = "SELECT * FROM clients, contacts WHERE clients.company LIKE '%$search%' OR contacts.name LIKE '%$search%'" ; $result = mysql_query($sql); however its not doing the right thing.... if I pass the name John to the page, i need to see all records where john is in the company name OR where john is in the contact name can anyone help? Link to comment https://forums.phpfreaks.com/topic/149995-simple-or-qry-error/ Share on other sites More sharing options...
drisate Posted March 18, 2009 Share Posted March 18, 2009 however its not doing the right thing.... What is it doing? Link to comment https://forums.phpfreaks.com/topic/149995-simple-or-qry-error/#findComment-787735 Share on other sites More sharing options...
Zane Posted March 18, 2009 Share Posted March 18, 2009 however its not doing the right thing.... So what IS it doing then? instead Link to comment https://forums.phpfreaks.com/topic/149995-simple-or-qry-error/#findComment-787736 Share on other sites More sharing options...
Zane Posted March 18, 2009 Share Posted March 18, 2009 however its not doing the right thing.... What is it doing? haha...nice Link to comment https://forums.phpfreaks.com/topic/149995-simple-or-qry-error/#findComment-787737 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.