1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'and p.is_bundle = 0 ORDER BY op.products_quantity LIMIT 50' at line 13

SELECT op.products_id, op.products_quantity FROM products_to_categories p2c INNER JOIN orders_products op ON op.products_id = p2c.products_id INNER JOIN products p ON p.products_id = op.products_id AND p.products_status = 1 INNER JOIN orders o ON op.orders_id = o.orders_id WHERE and p.is_bundle = 0 ORDER BY op.products_quantity LIMIT 50

[XT SQL Error]