Could not connect: 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 p.product_visible = 1' at line 1
SQL USED: SELECT * FROM product AS p JOIN sub_cat AS sc ON p.sub_cat = sc.sub_cat JOIN parent_cat AS pc ON sc.parent_cat = pc.parent_cat WHERE pc.parent_cat = AND p.product_visible = 1