mubarakabbas Posted January 7, 2010 Share Posted January 7, 2010 Hi, $sql = SELECT * FROM articlessection where 1 and ArticlesSection_Name LIKE %'ar'% and Language_ID =2 Order by ArticlesSection_Order ASC echo $sql; giving me syntax error in like Link to comment https://forums.phpfreaks.com/topic/187548-whats-wrong-in-this-statement/ Share on other sites More sharing options...
PravinS Posted January 7, 2010 Share Posted January 7, 2010 Check the % character, it should be in single quotes $sql = SELECT * FROM articlessection where 1 and ArticlesSection_Name LIKE '%ar%' and Language_ID =2 Order by ArticlesSection_Order ASC Link to comment https://forums.phpfreaks.com/topic/187548-whats-wrong-in-this-statement/#findComment-990198 Share on other sites More sharing options...
mubarakabbas Posted January 7, 2010 Author Share Posted January 7, 2010 Thank You, I got it right... Check the % character, it should be in single quotes $sql = SELECT * FROM articlessection where 1 and ArticlesSection_Name LIKE '%ar%' and Language_ID =2 Order by ArticlesSection_Order ASC Link to comment https://forums.phpfreaks.com/topic/187548-whats-wrong-in-this-statement/#findComment-990209 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.