Постоянный участник
Покинул форум
Сообщений всего: 2508
Дата рег-ции: Май 2009
Откуда: Днепропетровск, Украина
Помог: 75 раз(а)
|
CODE ( SQL):
скопировать код в буфер обмена
SELECT table_product.*, table_photo_product.photo_product4, table_product_brend.name AS name_brend FROM table_product LEFT JOIN table_product AS temp ON table_product.id=temp.parent LEFT JOIN table_photo_product ON table_photo_product.id_articul=table_product.id AND table_photo_product.nomber=1 AND table_photo_product.id_color=table_product.color LEFT JOIN table_product_brend ON table_product_brend.id=table_product.brend WHERE temp.category_id IN (1,2,3) AND temp.visible=1 AND table_product.new=0 GROUP BY table_product.id ORDER BY table_product.date DESC
|