error occured (/usr/home/v-hosts/motorcyclecloseouts.com/htdocs/pages/product.php 43)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 (LOWER( CONCAT_WS( '', b.name, '_', p.title)) = 'hjc_cl-15 and cl-sp breath ' at line 7
SELECT p.*,b.name AS brand_name, LENGTH( b.logo) AS logo_length,b.chart_url, pap.`price+-`, p.item_code FROM products p LEFT JOIN products_attributes pap ON pap.item_code=p.item_code LEFT JOIN brands b ON p.brand=b.ido JOIN categories_status cs ON cs.product_id=p.ido WHERE p.active=1 AND p.is_trouble=0 AND cs.category_id= AND (LOWER( CONCAT_WS( '', b.name, '_', p.title)) = 'hjc_cl-15 and cl-sp breath box') GROUP BY cs.product_id