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.'%\'"; 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 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 Link to comment https://forums.phpfreaks.com/topic/256214-quick-select-statement-problem/#findComment-1313469 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.