PEAR Error DB Error: syntax error : SELECT `eshop_products`.`id` as `id` , `eshop_products`.`model` as `model` , `eshop_products`.`image` as `image` , `eshop_products`.`price` as `price` , `eshop_products`.`special_price` as `special_price` , `eshop_products`.`special_start` as `special_start` , `eshop_products`.`special_end` as `special_end` , `eshop_products`.`buy_price` as `buy_price` , `eshop_products`.`quantity` as `quantity` , `eshop_products`.`stock_alert` as `stock_alert` , `eshop_products`.`allow_sub` as `allow_sub` , `eshop_products`.`virtual` as `virtual` , `eshop_products`.`download` as `download` , `eshop_products`.`max_downloads` as `max_downloads` , `eshop_products`.`download_name` as `download_name` , `eshop_products`.`download_mime` as `download_mime` , `eshop_products`.`weight` as `weight` , `eshop_products`.`tax_rate` as `tax_rate` , `eshop_products`.`manufacturer` as `manufacturer` , `eshop_products`.`min_qty` as `min_qty` , `eshop_products`.`max_qty` as `max_qty` , `eshop_products`.`free` as `free` , `eshop_products`.`call` as `call` , `eshop_products`.`cat_id` as `cat_id` , `eshop_products`.`review_id` as `review_id` , `eshop_products`.`group_id` as `group_id` , `eshop_products`.`availability_id` as `availability_id` , `eshop_products`.`configurable_attributes` as `configurable_attributes` , `eshop_products`.`product_order` as `product_order` , `eshop_products`.`new_untill` as `new_untill` , `eshop_products`.`rating` as `rating` , `eshop_products`.`date_added` as `date_added` , `eshop_products`.`date_modified` as `date_modified` , `eshop_products`.`published` as `published` , `eshop_products`.`out_of_stock` as `out_of_stock` , `eshop_products`.`extra_info` as `extra_info` , `eshop_products`.`extra_size` as `extra_size` , `eshop_products`.`extra_color` as `extra_color` , `eshop_products`.`extra_shipping` as `extra_shipping`
, if (`eshop_products`.`special_start` <= now() and `eshop_products`.`special_end` >= now(),1,null) as `is_special` , if (`eshop_products`.`special_start` <= now() and `eshop_products`.`special_end` >= now(),`eshop_products`.`special_price`,`eshop_products`.`price`) as `the_price` , if(`eshop_products`.`new_untill` > now(),1, null) as `is_new` , `eshop_products`.`price`-`eshop_products`.`special_price` as `save` , `eshop_categories`.`parent_id` as `parent_id` , `eshop_categories`.`right_id` as `right_id` , `eshop_categories`.`left_id` as `left_id` , `eshop_categories`.`level` as `level`
, `eshop_prod_to_lang`.`url` as `text_url` , `eshop_prod_to_lang`.`name` as `text_name` , `eshop_prod_to_lang`.`teaser` as `text_teaser`
, `eshop_manufacturers`.`url` as `brand_url` , `eshop_manufacturers`.`name` as `brand_name` , `eshop_manufacturers`.`image` as `brand_image`
FROM `eshop_products`
LEFT JOIN `eshop_prod_to_lang` ON (`eshop_prod_to_lang`.`prod_id`=`eshop_products`.`id`)
LEFT JOIN `eshop_categories` ON (`eshop_categories`.`id`=`eshop_products`.`cat_id`)
LEFT JOIN `eshop_manufacturers` ON (`eshop_manufacturers`.`id`=`eshop_products`.`manufacturer`)
LEFT JOIN `eshop_prod_to_attributes` ON (`eshop_prod_to_attributes`.`prod_id`=`eshop_products`.`id`)
WHERE ( ( eshop_prod_to_lang.`lang_id` = 1 ) ) AND ( ( eshop_categories.`published` = 1 ) ) AND ( eshop_products.cat_id in (87,212,220,122,123,131,118,227,121,87,218,139,130,119,132,133,231,233,243,247,269,270) ) AND ( ( eshop_prod_to_attributes.`lang_id` = 1 ) ) AND ( `eshop_prod_to_attributes`.`opt_id` in (384,422) ) AND ( `eshop_products`.`published` = 1 )
GROUP BY `eshop_products`.`id` having count( distinct `eshop_prod_to_attributes`.`opt_id`) >= 2 , eshop_products.id
ORDER BY `is_new` desc
[nativecode=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 ' eshop_products.id
ORDER BY `is_new` desc' at line 13]