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? Quote Link to comment 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. Quote Link to comment 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.