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 '-0,' at line 19
select distinct m.manufacturers_id, p.products_id,
pd.products_name, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price,
NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as
final_price , SUM(tr.tax_rate) as tax_rate from products p left join manufacturers m
using(manufacturers_id) left join specials s on p.products_id = s.products_id left join tax_rates tr on p.products_tax_class_id = tr.tax_class_id left
join zones_to_geo_zones gz on tr.tax_zone_id = gz.geo_zone_id and (gz.zone_country_id is
null or gz.zone_country_id = '0' or gz.zone_country_id = '73') and
(gz.zone_id is null or gz.zone_id = '0' or gz.zone_id = '182'), products_description pd, categories c, products_to_categories p2c where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '3' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and (IF(s.status, s.specials_new_products_price, p.products_price) *
if(gz.geo_zone_id is null, 1, 1 + (tr.tax_rate / 100) ) >= 500) and (IF(s.status, s.specials_new_products_price, p.products_price) *
if(gz.geo_zone_id is null, 1, 1 + (tr.tax_rate / 100) ) <= 1500) group by p.products_id, tr.tax_priority order by p.products_price limit -0,
[TEP STOP]
|