Фото | Сортировать по наименованию | Наличие | Цена (От дорогого к дешевому) | |
---|---|---|---|---|
SELECT g.`id`, g.`name`, g.`fullname`, g.`slug`, p.`price`, g.`at_stock`, g.`on_hand`, g.`min_sale`, g.`mainPhotoID`, i.`path` AS imagePath, s.`name` AS supName, s.`abbr` AS supAbbr FROM `goods` g LEFT JOIN `prices` AS p ON (p.`good_id`=g.`id` AND p.`type`=g.`price_type`) LEFT JOIN `category` AS c ON c.`id`=g.`category_id` LEFT JOIN `brands` AS b ON b.`id`=g.`brand_id` LEFT JOIN `suppliers` AS s ON s.`id`=g.`supplier_id` LEFT JOIN `images2` AS i ON (i.`id`=g.`mainPhotoID` AND i.`hide`='no') LEFT JOIN a_prod_catalog_goods as pg ON pg.good_id=g.id LEFT JOIN `a_prod_filter_good_vs` AS gp ON (g.id = gp.good_id) WHERE pg.`category_id` IN (7016,7016,70282,70283,70284,70285,70286,70287,70288,70289,70290,70291,70292,70293,70294,70295,70296,70297,70298,70299,70300,70301,70302,70322,70323,70324,70325,70326,70327,70328,70329,70330,70331,70332,70333,70334,70335,70336,70337,70338,70339,70340,70341,70342,70343,70344,70345,70346,70347,70348,70349,70350,70351,70352,70353,70354,70355,70356,70357,70358,70359,70360,70361,70362,70363,70364,70365,70366,70367,70368,70369,70370,70371,70372,70373,70374,70375,70376,70377,70378,70379,70380,70381,70382,70383,70455,70456,70457,70458,70469,70470,70471,70499,70500,70501,70546,70549,70566,70567,70574,70575,70576,700099,700100,700101,700102,700103,700104,700105,700106,700107,700108,700109,700110,700111,700112,700113,700114,700115,700116,700117,700118,700119,700294,700295,700296,700297,700298,700299,700300,700301,700302,700303,700304,700305,700306,700307,700308,700309,700310,700311,700312,700313,700363,700408) AND p.`price`!=0 GROUP BY g.id ORDER BY IF(g.`at_stock`='yes','0',IF(g.`at_stock`='order','1',IF(g.`on_hand`>0,'0','2'))), g.`fullname` LIMIT 102900,100; |
ЮниМаг.РФ - интернет-магазин строительных материалов и инструментов по всей России © 2024
Заполните контактную информацию
Менеджер свяжется с Вами
В ближайшее время