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 IF(T1.permanent_syn_to_website,1,T1.status!=1) AND T1.syn_to_website=1 GROU' at line 1

select T1.id,T1.width,T1.depth,T1.height,T1.old_pc_flag,T1.regular_price,T1.sale_price,T1.cost_price,T1.m_product_name,T1.discount_percentage,T1.last_price,T1.import_id,T1.dealer_price from manzel_furniture as T1 left join furnitures_categories as T3 on T3.pc_id=T1.id where T3.cat_id=86 AND T3.subcat_id= AND IF(T1.permanent_syn_to_website,1,T1.status!=1) AND T1.syn_to_website=1 GROUP BY T1.id ORDER BY T1.id DESC Limit 0,15

Filename: /var/www/html/reclaimedshop.com/default/models/homemodel.php

Line Number: 217