mackin Posted February 1, 2012 Share Posted February 1, 2012 is this code correct? I never know where the \ and ' go in relation to the % $sqlstring = "SELECT * FROM town_coords WHERE town_name ='\%'.$airport.'%\'"; Quote Link to comment https://forums.phpfreaks.com/topic/256214-quick-select-statement-problem/ Share on other sites More sharing options...
ManiacDan Posted February 1, 2012 Share Posted February 1, 2012 $sqlstring = "SELECT * FROM town_coords WHERE town_name LIKE '%{$airport}%'"; -Dan Quote Link to comment https://forums.phpfreaks.com/topic/256214-quick-select-statement-problem/#findComment-1313465 Share on other sites More sharing options...
mackin Posted February 1, 2012 Author Share Posted February 1, 2012 thx dan Quote Link to comment https://forums.phpfreaks.com/topic/256214-quick-select-statement-problem/#findComment-1313469 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.