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 Quote 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 Quote 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 Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.