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 p2c.categories_id != 0' at line 4

SELECT p.products_id, p.products_sort, p2c.categories_id FROM products p LEFT JOIN products_to_categories p2c ON p.products_id = p2c.products_id WHERE p.products_id = AND p2c.categories_id != 0

[XT SQL Error]