SELECT p.id, p.name_lat as name, p.present_lat as present, p.price, p.price2, p.on_stock, p.amount_onplace, p.amount_onwarehouse, p.manufacturer_link, p.added_time, GROUP_CONCAT(i.id ORDER BY i.ord ASC) as image_names FROM products p LEFT JOIN categories c ON (p._categ = c.id) LEFT JOIN suppliers as s ON s.id=p.supplier_id LEFT JOIN xmllink_images_2 as i ON i.XML_ID = p.XML_ID WHERE (p._categ=2818)AND (((p.amount_onplace>0) OR (p.amount_onwarehouse>0)) AND disable<>1 )AND s.disabled=0 GROUP BY p.id ORDER BY p.price
Kategorijas