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 'AND Status=1 ORDER BY B.update_date DESC LIMIT 0,10' at line 1SELECT B.*,C.cat_name FROM tsc_site B INNER JOIN tsc_site_category C ON C.cat_id=B.cat_id WHERE C.sec_id= AND Status=1 ORDER BY B.update_date DESC LIMIT 0,10