A Database Error Occurred
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 C.category_right <=' at line 1
SELECT count(distinct P._L_InventoryID) as num FROM products_has_type_of_category T, inventory P , inventorycategories_has_inventory PC , inventorycategories C WHERE T.products_prefix_id = P._L_InventoryID and C.active=1 and C.category_id=PC._R_CategoryID and PC._R_InventoryID=_L_InventoryID and C.category_left >= and C.category_right <=