Choose Categories from the left menu, and Sub-categories from the right.
SELECT categories.name as catname,subcats.id,subcats.name from subcats left join categories on categories.id=subcats.cat where subcats.cat=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 1