Database Error
SQL: select p.products_model,
pd.products_name,
round(if(tr.tax_rate, ((p.products_price * tr.tax_rate) / 100) + p.products_price, p.products_price), 2) as products_price,
round(IF(s.status, if(tr.tax_rate, ((s.specials_new_products_price * tr.tax_rate) / 100) + s.specials_new_products_price, s.specials_new_products_price), null),2) as special_price,
concat('/products/', m.manufacturers_url_safe_name, '/', pd.products_url_safe_name, '/') as url,
p.products_image,
m.manufacturers_name,
m.manufacturers_url_safe_name
from products as p
left join products_description as pd on pd.products_id = p.products_id
left join specials as s on s.products_id = p.products_id
left join tax_rates as tr on tr.tax_class_id = p.products_tax_class_id
left join manufacturers as m on m.manufacturers_id = p.manufacturers_id
left join products_to_categories_new as ptcn on ptcn.products_id = p.products_id and ptcn.home_category = 1
where p.manufacturers_id = (select manufacturers_id from products where products_model = '242174')
and p.products_is_child = 0
and p.products_status = 1
and p.products_quantity > 0
and p.product_shown_on_website = 1
and left(p.products_model, 1) not in ('c', 'k')
and ptcn.categories_id = (select ptcn.categories_id from products as p
left join products_to_categories_new as ptcn on ptcn.products_id = p.products_id and ptcn.home_category = 1
where p.products_model = '242174') and p.products_model not in ('242174') order by ABS(round(if(tr.tax_rate, ((p.products_price * tr.tax_rate) / 100) + p.products_price, p.products_price), 2) - ) ASC
limit 0, 4
Error: 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 ') ASC
limit 0, 4' at line 23 (1064)
URL: www.spiritofnature.co.uk/products/natural-collection-select/mega-zoom-binoculars---12-x-60/)
Date: Wed, 22 May 2013 20:48:54 +0100