Фото | Сортировать по наименованию | Наличие | Цена (От дорогого к дешевому) | |
---|---|---|---|---|
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 (100005,100005,100006,100007,100025,100026,100034,100035,100040,100041,100058,100059,100062,100074,100075,100076,100077,100104,100105,100110,100126,100127,100128,100164,100186,100229,100242,100255,100262,100263,100265,100287,100342,100367,100397,100424,100448,100456,100466,100467,100468,100490,100513,100523,100533,100540,100541,100551,100552,100558,100571,100575,100624,100627,100628,100632,100633,100645,100646,100649,100650,100655,100657,100664,100665,100667,100668,100669,100672,100691,100694,100697,100702,100707,100738,100755,100758,100761,100762,100766,100768,100769,100791,100796,100818,100823,100856,100859,100862,100868,100869,100871,100891,100897,100908,100933,100964,100965,100968,100969,100975,100984,100994,101009,101011,101025,101027,101050,101051,101064,101081,101089,101120,101121,101122,101127,101133,101134,101136,101137,101143,101152,101163,101169,101170,101199,101204,101206,101215,101234,101249,101257,101259,101272,101294,101296,101308,101315,101316,101328,101329,101346,101347,101367,101368,101369,101370,101371,101372,101373,101374,101375,101376,101377,101378,101436,101464,101535,101538,101558,101589,101647,101650,101661,101666,101683,101697,101739,101769,101780,101800,101811,101853,101860,101877,101889,101918,101946,101949,101960,101964,101966,101967,101974,102062,102095,102109,102123,102169,102177,102240,102244,102258,102324,102346,102366,102394,102408,102447,102460,102483,102489,102521,102539,102547,102559,102573,102610,102613,102682,102684,102695,102696,102699,102709,102710,102724,102760,102770,102779,102843,102890,102903,102915,102927,102956,102959,102961,103006,103014,103045,103049,103057,103071,103080,103111,103118,103162,103189,103194,103214,103225,103254,103354,103399,103419,103429,103439,103442,103444,103468,103489,103496,103497,103502,103526,103528,103532,103535,103540,103554,103581,103594,103601,103611,103645,103672,103677,103706,103735,103835,103873,103880,103920,103923,103926,103950,103971,103978,104010,104012,104017,104036,104037,104083,104118,104127,104159,104176,104191,104220,104228,104235,104241,104248,104320,104365,104370,104405,104408,104411,104463,104475,104495,104521,104522,104548,104561,104612,104639,104676,104702,104713,104737,104778,104802,104815,104847,104887,104890,104922,104945,104956,104984,105003,105004,105030,105043,105085,105125,105144,105174,105287,105307,105332,105369,105371,105372,105375,105397,105398,105441,105444,105469,105488,105489,105515,105570,105581,105657,105701,105740,105761,105767,105772,105792,105794,105817,105856,105860,105868,105882,105883,105887,105925,105926,105929,105932,105954,105973,105974,105996,106000,106002,106023,106025,106045,106067,106088,106158,106187,106200,106253,106256,106258,106284,106303,106342,106368,106373,106393,106408,106415,106459,106460,106511,106548,106723,106737,106742,106770,106778,106801,107062,107081,107117,107180,107187,107193,107252,107407,107419,107533,107838,107876,107915,108094,108121,108175,108184,108211,108216,108254,108343,108372,108411,108489,108513,108521,108592,108599,108643,108711,108828,108956,109574,110708,110718,110917,110920,110977,111144,111412,111447,111473,111619,111622,111869,111964,112356,112466,112495,112670,112673,112720,112725,112726,112727,112799,112802,112816,112827,112864) 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 23900,100; |
ЮниМаг.РФ - интернет-магазин строительных материалов и инструментов по всей России © 2024
Заполните контактную информацию
Менеджер свяжется с Вами
В ближайшее время