sql is SELECT * FROM son_content WHERE parentid= AND status='A' AND hide_nav=0 ORDER BY sequence DESC 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='A' AND hide_nav=0 ORDER BY sequence DESC' at line 1