Всего выполнено запросов: 2853 шт. за 0.3767 сек. Развернуть Закрыть
Ошибка в SQL запросе: SELECT COUNT(DISTINCT p.id) AS count FROM `mg_product` p LEFT JOIN `mg_category` c ON c.id = p.cat_id LEFT JOIN `mg_product_variant` pv ON p.id = pv.product_id LEFT JOIN ( SELECT pv.product_id, round(SUM(IF(pv.count <0, 1000000, pv.count)),2) AS varcount FROM `mg_product_variant` AS pv GROUP BY pv.product_id ) AS temp ON p.id = temp.product_id WHERE (p.id IN (2747, 2748, 2749, 2752, 7396, 17605, 17995, 17996, 17997, 17998, 18238, 18239, 82, 83, 84, 85, 86, 286, 641, 643, 644, 645, 674, 1349, 1350, 1381, 1443, 1444, 1737, 1751, 1752, 1775, 1776, 1901, 1903, 1904, 1907, 2904, 2921, 2994, 2996, 2997, 2998, 3000, 3001, 3002, 3006, 3007, 3008, 3761, 4947, 4948, 4986, 5125, 5126, 7136, 7137, 7138, 7139, 7140, 7254, 7256, 13372, 13373, 13536, 13537, 13538, 13667, 13750, 13751, 13752, 14105, 14190, 14191, 14192, 14193, 14198, 14199, 14476, 14477, 14478, 14527, 14528, 14593, 14594, 15269, 15270, 15271, 15342, 15343, 15344, 15345, 15346, 15347, 15348, 15349, 15860, 15909, 15910, 15911, 15912, 15913, 16225, 16867, 16868, 16869, 17034, 17035, 17036, 17037, 17038, 17039, 17118, 17119, 17120, 17121, 17134, 17135, 17136, 17137, 17138, 17139, 17140, 17530, 17531, 17532, 17533, 17534, 17591, 17798, 17799, 17800, 17801, 18080, 18081, 18082, 18083, 18084, 18085, 18168, 18169, 196, 197, 1449, 1468, 1823, 2413, 4141, 4445, 4950, 4951, 5027, 6767, 13964, 13965, 14123, 14194, 14200, 14201, 14202, 14203, 14204, 14205, 14206, 14207, 14208, 14209, 14210, 14211, 14212, 14213, 14214, 14215, 14216, 14217, 14218, 14219, 14220, 14221, 14222, 14463, 14464, 14946, 16146, 16147, 16399, 16400, 16401, 16402, 16403, 16404, 16843, 16900, 16901, 16902, 16903, 16927, 16937, 16938, 16939, 16940, 16941, 16942, 17104, 17105, 17106, 17600, 17601, 17892, 17893, 17894, 17895, 17919, 17920, 18119, 18120, 18121, 18122, 116, 593, 1194, 1195, 1234, 1235, 1236, 1237, 1326, 1327, 1328, 1329, 1330, 1331, 1333, 1394, 1395, 1396, 1397, 1398, 1399, 1403, 1404, 1879, 1880, 1881, 1884, 1885, 1886, 1960, 2193, 2431, 2436, 2454, 2458, 2459, 2461, 2567, 2571, 2848, 2871, 3027, 3048, 3057, 3058, 3059, 3200, 3201, 3665, 3720, 3728, 3910, 3911, 4175, 4246, 4413, 4582, 4585, 4651, 5121, 5122, 5123, 5124, 6766, 6773, 6774, 6775, 7257, 7258, 7259, 7260, 7385, 7386, 12886, 12913, 12917, 12919, 12920, 12938, 12944, 12945, 12954, 12955, 12956, 12957, 12958, 12963, 12980, 12981, 12989, 12992, 12993, 12994, 13002, 13003, 13004, 13070, 13136, 13181, 13197, 13198, 13200, 13205, 13208, 13211, 13212, 13214, 13227, 13228, 13236, 13237, 13242, 13256, 13257, 13278, 17773, 17774, 17775, 17776, 17777, 17778, 17780, 17781, 17782, 17783, 17784, 17785, 17786, 17787, 17788, 17789, 17790, 17791, 17792, 17793, 17794, 17795, 17796, 17797, 17825, 17946, 18213, 18214, 18217, 18218, 18232, 18247, 18086, 18087, 18088, 18089, 18090, 18091, 18092, 18093, 18094, 18095, 18096, 18097, 18098, 18099, 18100, 18101, 18102, 18103, 18104, 18105, 18106, 18107, 18108, 18109, 18110, 18111, 18112, 18113, 18114, 18115, 18225, 18226, 18227, 18228, 18229, 3076, 3080, 3083, 3088, 15377, 15378, 15379, 15380, 15381, 15382, 15383, 15384, 15385, 15386, 15387, 15388, 15389, 15390, 15391, 15395, 17289, 17290, 17291, 17292, 17293, 17294, 17295, 17296, 17297, 17298, 17299, 17300, 17301, 17302, 211, 237, 238, 239, 240, 241, 1291, 1295, 1736, 1825, 2580, 3947, 3974, 3975, 3978, 3980, 4041, 4385, 4717, 4727, 7329, 13455, 13456, 13457, 13458, 13559, 13982, 13983, 13984, 14086, 14101, 14102, 14103, 14104, 14413, 14465, 14751, 14752, 14753, 14947, 15008, 15009, 15032, 15101, 15102, 15103, 15213, 15214, 15370, 15847, 15848, 15915, 16071, 16072, 16073, 16074, 16075, 16112, 16113, 16114, 16135, 16136, 16137, 16138, 16139, 16140, 16141, 16142, 16143, 16144, 16145, 16211, 16212, 16213, 16214, 16215, 16216, 16217, 16218, 16262, 16383, 16384, 16396, 16397, 16580, 16581, 16582, 16583, 16584, 16585, 16586, 16587, 16588, 16589, 16590, 16591, 16611, 16612, 16613, 16614, 16615, 16616, 16617, 16618, 16619, 16620, 16621, 16622, 16623, 16624, 16625, 16626, 16627, 16628, 16629, 16630, 16631, 16632, 16633, 16634, 16635, 16636, 16637, 344, 347, 367, 368, 988, 989, 991, 1334, 1747, 1748, 2663, 2675, 2683, 3107, 3111, 3119, 3124, 3125, 3769, 4383, 5068, 5069, 5070, 5071, 5072, 5073, 5074, 5075, 5076, 5077, 5078, 5079, 5080, 5081, 5082, 5084, 5085, 5086, 7330, 7331, 7332, 7387, 7389, 13560, 13561, 13562, 13563, 13564, 13565, 13566, 13567, 13568, 13569, 13570, 13571, 13572, 13573, 13574, 13575, 13576, 13577, 13578, 13579, 13580, 13581, 13582, 13583, 13584, 13585, 13586, 13587, 13588, 13589, 13590, 13591, 13592, 13985, 13986, 14421, 15034, 15035, 15036, 15037, 15104, 15105, 15106, 15107, 15108, 15109, 15110, 15111, 15112, 15113, 15114, 15115, 15116, 15117, 15118, 15119, 15120, 15121, 15122, 15123, 15124, 15125, 15126, 15127, 15128, 15129, 15215, 15216, 15217, 15218, 15219, 15220, 15221, 15399, 15400, 15401, 15402, 15403, 15404, 15405, 15406, 15407, 15408, 15409, 15410, 15411, 15412, 15413, 15414, 15415, 15416, 15417, 15418, 15419, 15420, 15421, 15422, 15423, 15424, 15425, 15426, 15427, 15428, 15429, 15430, 15431, 15432, 15433, 15434, 15435, 15436, 15437, 15438, 15439, 15440, 15441, 15442, 15443, 15444, 15445, 15446, 15447, 15448, 15449, 15450, 15451, 15452, 15453, 15454, 15455, 15456, 15457, 15458, 15459, 15460, 15461, 15462, 15463, 15464, 15465, 15466, 15467, 15468, 15469, 15470, 15471, 15472, 15473, 15714, 15715, 15716, 15717, 15718, 15719, 15720, 15721, 15774, 15775, 15776, 15777, 15778, 15779, 15780, 15835, 15836, 15837, 15838, 15839, 15840, 15841, 15842, 15843, 15844, 15845, 15846, 15849, 15850, 15851, 15852, 15853, 15854, 15855, 15916, 15917, 15918, 15919, 15920, 16076, 16077, 16078, 16079, 16080, 16081, 16082, 16083, 16084, 16085, 16086, 16087, 16247, 16379, 16380, 16381, 16382, 16577, 16578, 16579, 16916, 17383, 17399, 2803, 2804, 2805, 2806, 2807, 2809, 2810, 2811, 2812, 2813, 2814, 5044, 5045, 5046, 15208, 15209, 17913, 17914, 17915, 17916, 17917, 17918, 4713, 301, 493, 718, 719, 720, 971, 1227, 1321, 1322, 1325, 1749, 1968, 1969, 1970, 2054, 2056, 2059, 2061, 2062, 2429, 2594, 2595, 2894, 2895, 2900, 3302, 3327, 3332, 3344, 3360, 3667, 3921, 3928, 3941, 4995, 4996, 4999, 5001, 5003, 5022, 6771, 7267, 8330, 12330, 12377, 13546, 13547, 13548, 13549, 13550, 13848, 13973, 14082, 14083, 14108, 14109, 14271, 14272, 14273, 14274, 14275, 14276, 14277, 14423, 14425, 14426, 14582, 14612, 14613, 14614, 14615, 14616, 14617, 14618, 14623, 14624, 14625, 14626, 14627, 14628, 14629, 14630, 14631, 14632, 14633, 14634, 14635, 14636, 14642, 14643, 14644, 14645, 14646, 14698, 14699, 14700, 14701, 14702, 14703, 14704, 14705, 14706, 14707, 14708, 15042, 15043, 15044, 15045, 15046, 15048, 15049, 15050, 15051, 15052, 15053, 15054, 15164, 15261, 15262, 15263, 15264, 15265, 15266, 15357, 15358, 15359, 15360, 15617, 15618, 15619, 15620, 15621, 15622, 15623, 15624, 15625, 15626, 15627, 15628, 15638, 15639, 15640, 15641, 15642, 15643, 15644, 15645, 15646, 15647, 15648, 15649, 15650, 15651, 15652, 15653, 15654, 15655, 15656, 15657, 15658, 15659, 15660, 15661, 15662, 15663, 15664, 15665, 15666, 15667, 15668, 15669, 15670, 15671, 15672, 15673, 15674, 15675, 15676, 15677, 15678, 15679, 15680, 15681, 15682, 15683, 15684, 15685, 15686, 15687, 15688, 15689, 15690, 15691, 15692, 15693, 15694, 15695, 15696, 15697, 15698, 15699, 15700, 15701, 15702, 15703, 15704, 15705, 15706, 15707, 15708, 15709, 15710, 15711, 15712, 15750, 15751, 15752, 15753, 15754, 15755, 15756, 15757, 15758, 15759, 15760, 15761, 15762, 15763, 15764, 15765, 15766, 15767, 15768, 15769, 15770, 15771, 15772, 15866, 15867, 15868, 16049, 16050, 16051, 16052, 16053, 16054, 16056, 16057, 16058, 16061, 16062, 16063, 16064, 16065, 16066, 16067, 16068, 16069, 16239, 16240, 16241, 16242, 16243, 16251, 16252, 16253, 16254, 16255, 16256, 16257, 16258, 16259, 16260, 16261, 16265, 16266, 16267, 16268, 16269, 16270, 16271, 16272, 16273, 16326, 16327, 16328, 16329, 16330, 16331, 16332, 16333, 16334, 16335, 16336, 16337, 16338, 16339, 16340, 16385, 16386, 16387, 16388, 16389, 16391, 16392, 16393, 16479, 16480, 16527, 16528, 16532, 16572, 16573, 16839, 16840, 16841, 16842, 16872, 16873, 16874, 16875, 16876, 16891, 16892, 16893, 16894, 16895, 16896, 16897, 16898, 16899, 16991, 16992, 16993, 17257, 17258, 17259, 17260, 17261, 17262, 17263, 17264, 17265, 17323, 17324, 17325, 17326, 17327, 17328, 17428, 17429, 17579, 17590, 17728, 18220, 435, 715, 716, 721, 1224, 1225, 1226, 1231, 1966, 3295, 3321, 3323, 3900, 4671, 4674, 13633, 13634, 13635, 13849, 13850, 14084, 14085, 14545, 14597, 14598, 14599, 14600, 14601, 14602, 14603, 14604, 14605, 14606, 14607, 14608, 14609, 14610, 14611, 14621, 14622, 15040, 15041, 15258, 15259, 15260, 15613, 15614, 15615, 15616, 15636, 15637, 15745, 15746, 15747, 15748, 15749, 16039, 16040, 16041, 16042, 16043, 16055, 16250, 16263, 16264, 16574, 16686, 17255, 17256, 17427, 1430, 2108, 2430, 3422, 4594, 14460, 14637, 14638, 14639, 14641, 14694, 14695, 14733, 14734, 14735, 14736, 15047, 15055, 15056, 15057, 15058, 15365, 15713, 15744, 16037, 16390, 16394, 16405, 16406, 16407, 16408, 16687, 16688, 17329, 17330, 17331, 17332, 17333, 17334, 17338, 17339, 18219, 966, 968, 2106, 2110, 2111, 2888, 3022, 3313, 3898, 4799, 13636, 13969, 13970, 13971, 13972, 14451, 14696, 14697, 15039, 15257, 15629, 15630, 15631, 15632, 15633, 15634, 15635, 15738, 15739, 15740, 15741, 15742, 15743, 16038, 16249, 16324, 16325, 16689, 16690, 224, 1964, 1965, 2433, 2434, 2435, 2889, 2890, 13511, 13631, 13632, 14619, 14620, 15038, 15736, 15737, 15773, 16013, 16014, 16015, 16016, 16017, 16018, 16019, 16020, 16021, 16022, 16023, 16024, 16025, 16026, 16027, 16028, 16029, 16030, 16031, 16032, 16033, 16034, 16035, 16036, 16059, 16060, 16683, 16684, 16685, 518, 1505, 12887, 12910, 12911, 12922, 12932, 12933, 12934, 12984, 13005, 13128, 13129, 13130, 13131, 13137, 13225, 13255, 13276)) AND OR (p.id NOT IN (13018, 13184, 17827, 16982, 16531, 16526, 17515, 16524, 16525, 16529)) AND ( ((p.price_course + p.price_course * (IFNULL(rate,0))) BETWEEN '1' AND '175568')OR ((pv.price_course + pv.price_course * (IFNULL(rate,0))) BETWEEN '1' AND '175568') ) AND ( 1=1 or FIND_IN_SET(0,p.`inside_cat`) ) AND p.id IN (7137,7136,7069,6925,6921,6794,6793,6792,6783,6782,6781,6780,6779,6775,6774,6773,6771,6767,6766,5134,5131,5129,5128,5127,5126,5125,5122,5121,5120,5116,5115,5100,5064,5063,5055,5051,5050,5048,5047,5043,5027,5022,5007,4999,4996,4993,4992,4986,4983,4982,4981,4967,4965,4964,4960,4956,4954,4953,4951,4950,4948,4947,4911,4904,4894,4885,4829,4807,4799,4727,4717,4674,4671,4669,4668,4666,4665,4664,4662,4661,4660,4659,4657,4651,4618,4612,4610,4594,4585,4564,4443,4420,4413,4385,4372,4344,4343,4246,4227,4203,4202,4195,4194,4175,4154,4141,4108,4100,4093,4091,4071,4055,4052,3997,3996,3992,3981,3980,3978,3975,3974,3947,3941,3911,3910,3900,3898,3795,3792,3775,3774,3772,3751,3748,3744,3743,3730,3729,3728,3726,3725,3720,3714,3699,3698,3697,3690,3685,3684,3679,3667,3665,3664,3663,3570,3422,3323,3321,3313,3295,3201,3200,3125,3124,3083,3076,3056,3047,3046,3045,3044,3042,3027,3025,3022,3008,3007,3006,3002,3001,3000,2998,2997,2996,2958,2951,2925,2921,2917,2908,2907,2905,2904,2900,2894,2890,2889,2888,2872,2871,2870,2863,2854,2851,2850,2843,2840,2838,2817,2758,2757,2756,2755,2754,2753,2751,2749,2748,2747,2737,2735,2733,2683,2607,2595,2594,2580,2571,2567,2555,2532,2528,2516,2511,2505,2499,2484,2483,2481,2461,2459,2458,2454,2452,2439,2438,2437,2434,2433,2431,2430,2429,2423,2420,2417,2416,2413,2412,2379,2377,2375,2374,2373,2331,2329,2296,2295,2274,2271,2257,2255,2215,2193,2185,2111,2110,2108,2062,2061,2059,2056,2054,2040,1986,1984,1983,1968,1966,1965,1964,1961,1937,1935,1934,1933,1929,1921,1915,1914,1913,1907,1904,1903,1901,1898,1896,1887,1886,1885,1884,1881,1880,1879,1875,1825,1823,1821,1801,1796,1792,1788,1776,1775,1760,1752,1751,1749,1737,1733,1670,1668,1666,1646,1644,1640,1585,1570,1541,1505,1502,1500,1468,1457,1456,1453,1449,1444,1443,1430,1422,1420,1418,1417,1413,1409,1407,1405,1404,1403,1402,1397,1396,1395,1394,1387,1383,1382,1375,1334,1333,1331,1330,1329,1328,1327,1326,1325,1322,1321,1314,1313,1308,1300,1299,1295,1291,1286,1281,1275,1260,1259,1258,1257,1256,1255,1253,1248,1243,1238,1237,1236,1235,1234,1231,1226,1225,1224,1221,1220,1219,1217,1214,1204,1203,1199,1195,1120,1118,1115,1113,1112,1109,1103,1088,1083,1082,1075,1071,1070,1066,1065,1040,1039,1038,1030,1029,1019,1016,1015,1010,1007,989,988,983,971,968,966,961,960,898,892,788,787,786,774,773,738,728,727,726,725,721,719,718,716,715,705,674,672,669,658,645,644,643,641,640,639,636,632,624,611,606,605,604,603,601,600,599,593,581,518,513,504,499,497,496,495,493,435,422,404,301,297,290,286,282,280,276,268,266,262,247,246,245,241,239,238,237,236,224,220,206,197,196,176,167,153,140,116,108,105,102,100,86,85,84,83,82,76,75,74,62,61,35,28,25,20,17,15,4,3,1,7138,7139,7140,2994,7179,7167,7166,1008,737,7117,635,634,623,49,585,7184,7185,7168,1538,7170,771,7171,7174,7182,1551,7183,7192,7194,7197,7203,2049,1058,1072,1076,1087,3749,6836,3773,3776,1247,994,2767,7152,7153,7165,7157,1020,7158,7159,7163,7162,1018,7161,3721,4244,4006,1756,7254,1970,7256,1381,7257,7258,7259,2436,3057,7267,7279,702,4319,4320,267,279,137,2515,2506,2504,2497,2214,151,162,4905,4907,4909,2864,7285,1401,7277,7278,7280,7281,7284,7282,6933,6790,6789,7329,4097,4098,4107,179,180,7333,7334,7335,1052,2372,7336,3700,7368,7369,4897,2927,2928,4095,7283,1745,7371,7372,7381,1597,7376,7380,7388,7387,7396,7397,7398,7399,4352,7389,7385,7386,7766,7769,7768,7767,7770,7775,7776,7772,7784,7790,7791,7792,12302,11407,9514,12435,12438,12430,12476,12679,12685,12752,12683,12686,12687,12688,12689,8330,2609,12874,14593,14594,14124,13668,14994,14569,14570,12958,16922,16937,8595,16843,16942,16940,16938,16939,16941,16865,15277,16936,16153,13522,12750,16943,16944,16945,16946,14572,14571,16857,16856,16854,16950,16947,16972,16973,16974,16975,16976,16977,16978,16979,17013,10014,9259,8437,17025,17015,10249,10251,10252,9500,11151,17023,17022,17008,17009,17010,17014,17016,17017,17020,17021,8584,17045,17046,17086,17085,17083,17081,17060,17061,17062,17063,17067,17068,17069,17071,17070,17064,8438,17089,17088,17087,14798,16994,16995,16851,13528,17091,17092,17093,17094,17095,17096,17097,17098,17099,17118,17119,17120,17121,15860,17124,17125,17126,17129,17132,17133,17134,17135,17137,17138,17136,17139,17140,17141,17152,17153,17154,17155,17147,17148,17104,17157,17158,17159,17105,17106,17160,17161,17162,17163,17164,12637,17146,17166,17167,17168,17149,17209,17210,17151,17211,17212,1249,17247,16320,14799,17246,17248,14980,15256,14791,14541,16992,15949,14926,17266,17267,17259,17260,17261,17272,17273,17274,17275,17276,17277,17150,17263,17278,6798,17255,17256,17314,17311,17312,17315,17317,17318,17319,17320,17321,17322,17323,17324,17325,17326,17327,17328,17329,17330,17331,17332,17333,17334,17338,17339,17340,17368,11125,17369,17370,11153,17372,17360,7390,17364,17365,9014,17343,17344,17345,17346,17347,17110,17116,17113,17114,17111,17112,13764,17423,17425,17424,13007,17435,17428,17429,17436,17437,17438,17440,17448,13314,17497,17142,17510,16432,17530,17531,17532,17563,17562,17540,17561,17560,17541,17533,17542,17534,17559,17558,17557,17556,17555,17546,17547,17568,17566,17565,17564,17571,17572,17579,17591,17590,15257,17584,17527,15176,14821,17599,17597,16677,17598,17596,17595,17593,2752,17600,761,17604,17605,17607,17615,17616,17433,3722,17065,13239,2848,17594,17640,17641,2435,12377,17592,17638,4713,17367,2053,17685,17728,13315,17748,17770,17771,17796,17793,17799,17800,17801,17803,17812,17813,17815,17804,17814,17808,17811,17810,17861,13965,17892,2443,17902,17906,17908,17909,12778,17899,17910,17911,17912,17888,17920,17893,17894,17895,17919,17887,12858,12860,17896,17900,17897,17921,17931,17930,17932,17924,17898,17889,17884,17945,17946,17944,17943,17942,17764,17883,17934,17882,17439,17809,17570,17849,17846,16571,14433,13763,17984,17985,17986,17987,17923,15058,17996,17995,17997,17998,18006,18005,18004,18009,17979,291,18031,18015,18081,18082,18083,18084,18086,18087,18088,18053,18051,18059,18089,18090,18085,18091,18092,18093,18094,18095,18096,18097,18098,18099,18100,18120,18122,18113,18114,18115,18130,18124,18125,18126,18132,18133,18144,18146,18137,18138,18139,18140,18141,18142,18143,18149,18150,18151,18168,18169,17115,18174,18176,18175,18177,18171,7068,7260,18185,16698,18182,18183,18186,18188,18043,17262,18190,18198,18199,18200,18205,18208,12919,18213,18214,18236,18237,18234,18235,18225,18226,18227,18228,18229,18216,18215,18238,18239,12777,18223,18222,18230,12645,18221,18145,18147,18243,18244,18247,18217,18218,18248,18249,18245,18310,18311,18312,18319,18318,18320,18342,18341,18343,14972,18340) AND p.`activity` = 1
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'OR (p.id NOT IN (13018, 13184, 17827, 16982, 16531, 16526, 17515, 16524, 16525,' at line 12

/var/www/u0853520/data/www/soyuztime.ru/mg-core/models/catalog.php (line 423)

/var/www/u0853520/data/www/soyuztime.ru/mg-core/models/catalog.php (line 103)

/var/www/u0853520/data/www/soyuztime.ru/mg-core/controllers/catalog.php (line 176)

/var/www/u0853520/data/www/soyuztime.ru/mg-core/lib/moguta.php (line 0)

/var/www/u0853520/data/www/soyuztime.ru/mg-core/mg-start.php (line 0)

/var/www/u0853520/data/www/soyuztime.ru/mg-core/index-start.php (line 126)

/var/www/u0853520/data/www/soyuztime.ru/index.php (line 4)