Фото | Сортировать по наименованию | Наличие | Цена (От дорогого к дешевому) | |
---|---|---|---|---|
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 (101512,101512,101605,101690,101717,101823,102119,102228,102232,102275,102425,102428,102450,102475,102626,102717,102806,102826,102845,102858,102859,102866,102910,102923,102972,103025,103115,103200,103206,103274,103290,103310,103330,103342,103393,103455,103491,103550,103561,103701,103721,103733,103759,103771,103773,103791,103823,103851,103877,103989,104018,104033,104054,104124,104125,104218,104230,104256,104308,104331,104333,104382,104477,104499,104518,104539,104602,104700,104709,104738,104758,104813,104828,104852,104881,104934,104943,104978,104981,105010,105037,105070,105113,105118,105172,105186,105193,105224,105235,105243,105298,105349,105366,105428,105506,105601,105617,105669,105676,105720,105752,105770,105778,105783,105851,105857,105991,106011,106103,106143,106155,106156,106162,106163,106213,106269,106411,106477,106497,106527,106551,106555,106583,106602,106614,106615,106678,106681,106727,106748,106788,106791,106800,106819,106848,106866,106886,106890,106922,106930,106935,106953,106954,106959,107017,107051,107066,107087,107098,107101,107123,107130,107152,107158,107209,107227,107267,107280,107290,107291,107327,107425,107452,107455,107468,107496,107557,107567,107579,107586,107604,107607,107620,107630,107631,107649,107667,107680,107697,107701,107708,107744,107768,107793,107808,107836,107851,107902,107905,107942,107945,107968,107969,107974,108005,108018,108039,108082,108125,108146,108173,108245,108251,108284,108308,108311,108313,108344,108357,108378,108382,108389,108421,108485,108512,108520,108583,108600,108622,108623,108641,108642,108647,108650,108683,108696,108717,108760,108788,108802,108807,108817,108824,108859,108891,108909,108922,108964,108995,108996,109027,109031,109059,109062,109082,109086,109107,109121,109130,109187,109215,109216,109254,109277,109278,109327,109328,109389,109390,109438,109439,109445,109475,109500,109501,109549,109597,109660,109667,109771,109798,109812,109883,109944,109965,110013,110014,110020,110035,110097,110111,110126,110141,110157,110333,110380,110492,110500,110501,110502,110530,110546,110571,110572,110573,110574,110575,110576,110681,110682,110683,110684,110711,110713,110778,110779,110781,110833,110834,110835,110845,110902,110903,110915,111005,111040,111089,111090,111091,111092,111093,111094,111095,111096,111097,111098,111099,111100,111101,111102,111103,111104,111105,111106,111107,111108,111136,111142,111145,111173,111194,111195,111196,111197,111198,111340,111395,111396,111440,111789,111894,111899,111997,112008,112014,112159,112172,112173,112221,112290,112341,112344,112373,112471,112473,112476,112543,112832) 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 82100,100; |
ЮниМаг.РФ - интернет-магазин строительных материалов и инструментов по всей России © 2024
Заполните контактную информацию
Менеджер свяжется с Вами
В ближайшее время