maxudaskin Posted July 25, 2007 Share Posted July 25, 2007 Is there anything wrong with this...? $result = mysql_query("select * from flights WHERE " . $_GET['searchfield'] . " LIKE ". $_GET['searchtype']); But when I search, it just brings back everything in that table. Is there anything wrong? Link to comment https://forums.phpfreaks.com/topic/61711-help-with-mysql/ Share on other sites More sharing options...
Wildbug Posted July 25, 2007 Share Posted July 25, 2007 Put quotes around the LIKE parameter (and probably %'s if you want a substring match): ....LIKE '%whatever%' instead of LIKE whatever. Link to comment https://forums.phpfreaks.com/topic/61711-help-with-mysql/#findComment-307220 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.