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 (t_pagesinfo.int_prim=1) ) ORDER BY t_infocategoryrecursive.int_sortorde' at line 1