An Error Was Encountered
Error Number: 1064
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 ptc_catid_to_dirid.dirid IN (select dirid from ptc_catid_to_dirid where cati' at line 4
SELECT DISTINCT(ptc_catid_to_dirid.catid), category.category as category, count(ptc_catid_to_dirid.catid) as cat_count FROM (category,ptc_catid_to_dirid) WHERE category.id = ptc_catid_to_dirid.catid and category.pid =0 AND ptc_catid_to_dirid.catid != and ptc_catid_to_dirid.dirid IN (select dirid from ptc_catid_to_dirid where catid= ) GROUP BY ptc_catid_to_dirid.catid ORDER BY category.category asc
