SELECT sb_article.*, acat_name
FROM sb_article
LEFT JOIN sb_acat ON sb_article.acat_id=sb_acat.acat_id WHERE ( sb_article.scode='A001' AND a_isactive=1 AND a_id='':')
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ':')' at line 3