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 'ERROR: SELECT t1.*, t2.* FROM ?#TABLE_CATEGORIES t1, ?#TABLE_CATEGORIES_TREE t2 ' at line 1