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 'select distinct p.products_id, p.products_image, p.products_price, p.pro' at line 1
select count(distinct p.products_id) as total from products p, products_description pd, products_to_categories p2c,categories c where (p.products_date_available is null or (p.products_date_available is not null and to_days(p.products_date_available)<=to_days(now()))) and p.products_id = pd.products_id and p.products_status = '1' and p2c.products_id = p.products_id and c.categories_id = p2c.categories_id select distinct p.products_id, p.products_image, p.products_price, p.products_tax_class_id, pd.products_name, pd.products_short_description from products p, products_description pd, categories c where p.products_status =1 and c.categories_status = 1 and p.products_ordered > 0 and p.products_id = pd.products_id and p.products_price > 0 limit 20 and pd.language_id = '2' and p2c.categories_id not in (137) order by p.products_date_available desc, p.products_id desc limit 9

[OLC SQL Error]