SQL Error: BIGINT UNSIGNED value is out of range in '((`db_sld_29`.`g`.`sklad` + `db_sld_29`.`g`.`in_list`) - `db_sld_29`.`g`.`noshow`)' at /var/www/sld/data/www/site12/public_html/lib/php/cms_sql/class.php line 1984
Array
(
    [code] => 1690
    [message] => BIGINT UNSIGNED value is out of range in '((`db_sld_29`.`g`.`sklad` + `db_sld_29`.`g`.`in_list`) - `db_sld_29`.`g`.`noshow`)'
    [query] => SELECT count(*) FROM
				(
				SELECT g.id
				FROM cms_good g
				LEFT JOIN cms_ref_vendor v	ON v.id=g.vendor_id
				LEFT JOIN cms_good_alias a	ON g.id=a.good_id
				     JOIN cms_good_tree gt	ON gt.id=g.pid
				LEFT JOIN cms_good_markup m	ON m.good_tree_id=gt.id AND m.distributor_id=1
				LEFT JOIN cms_prop_field pf	ON pf.prop_id=gt.prop_id
				LEFT JOIN cms_field f		ON f.id=pf.field_id
				
				WHERE TRUE  AND ((sklad+in_list-noshow) > 0 AND (g.pid IN (120,132,131,130,125,124,121,122,123,16,136,119) or (g.id in (263,429,562,757,845,2454,2776,4041,7129,7679,8469,8470,9448,9463,10027,11322,11602,11873,11876,12460,12537,12915,12934,12941,13106,13422,13423,14064,14246,14400,14592,15577,16085,17901,17657,16159,17790,17734,17735,16260,16392,16747,16875,16937,17020,17077,17090,17115,17117,17410,17656,17780,1823,2079,2205,2322,7389,8465,8860,9081,9818,10316,17668,10986,11751,13030,13076,13419,13421,14659,15160,15166,15348,15569,15591,15596,15895,16076,17775,17778,17732,17746,17736,16386,17114,17139,17329,17664,17393,17383,17616,17621,17698,17877,18061,19357,550,2315,6226,8468,10282,10546,10597,10991,11036,11076,11333,12600,12651,13084,13420,14058,14598,14651,15118,15191,15582,15686,15890,15891,15806,15807,15897,16087,16091,17761,17798,17746,16193,16343,16389,16498,16668,16670,16942,17061,17137,17384,17766,17621,17622,17747,17903,2008,2096,548,732,854,855,2110,2456,2457,6307,9250,10198,10277,10472,17668,10545,10547,10676,10931,10986,10995,11028,11029,11036,11066,12076,12241,12648,13043,13076,13079,13081,13089,13092,13093,13159,14312,14596,14597,14598,14599,14602,14603,14671,14677,14686,14783,14782,14848,14811,15056,15057,15059,15062,15081,15083,15087,15098,15103,15149,15154,15163,15177,15187,15190,15191,15194,15203,15205,15344,15346,15352,15358,15360,15364,15366,15370,15371,15373,15374,15554,15555,15569,15582,15583,15589,15591,15601,15607,15685,15694,15892,15890,15891,15912,15910,15911,15893,15851,15895,15894,16076,16108,17773,17649,17750,17736,16132,16134,16287,16331,16345,16370,16383,16585,16590,16596,16658,16696,16945,17019,17125,17147,17751,17259,17654,17653,17254,17353,17354,17355,17393,17380,17382,17521,17522,17524,17772,17755,17757,18076,18170,19196,19201,19480,19918,20039,20035,20038,10386,10386,11043,2098,11367,15431,11408,16090,16090,16130,15159,15159,15397,17645,17645,17647,16089,12550,15573,15575,15575,15576,15576,15574,15574,15571,15566,15566,15567,15567,277,732,2008,2065,2079,2088,2091,2093,2097,3981,8165,9250,9255,9454,9654,9656,9847,10273,10275,10276,10277,10281,10282,10518,10386,10451,10559,11050,10929,10931,11043,11215,11367,11406,11407,11476,11486,11645,11876,12156,12691,13028,13029,13088,13089,13090,13419,13422,13982,14065,14402,14545,14423,14552,14594,14585,14600,14659,14657,14654,14676,14679,14784,14778,14779,14781,15044,15046,15053,15055,15057,15060,15065,15121,15134,15149,15154,15159,15161,15163,15165,15170,15171,15184,15185,15190,15191,15194,15205,15410,15409,15428,15396,15397,15569,15571,15575,15576,15577,15597,15609,15679,15683,15684,15892,15910,15895,16376,16390,16852,16859,17230,17747,18070,10272,10272,13036,13036,13865,10342,13862,16139,16143,16827,9658,15181,15181,15181,14685,14605,14605,15151,10905,15189,15189,15180,15898,17208,17056,19495,6941,6941,6941,6941,6942,6942,6942,6942,6943,6943,6943,6943,14546,14546,15885,15885,13035,10519,10519,15983,13983,17779,15433,16097,17646,16753,16754,17771,17765,17765,3782,10199,10199,15550,15550,2319,15809,15899,10279,10279,10274,10274,10274,15572,15572,12077,12077,18169,18169,18169,15195,10843,18215,18216,18213,18214,18214,7753,1431,1432,2322,2716,2718,4041,6634,6941,6942,6943,7706,7779,8046,8679,10531,10974,10978,10979,10980,10984,10985,10986,11025,11027,11028,11036,11406,11600,11647,12026,12169,14210,14400,14686,15061,15154,15181,15182,15184,15420,15345,15551,15597,15679,15778,15779,15795,15870,15875,15851,15806,15810,15895,15894,15985,17752,17753,17761,17750,17724,17725,17726,17727,17728,17730,17758,16707,16745,16815,16816,16819,16821,16822,17080,17176,17756,17751,17383,18140,18170,18244,18256,18567,18840,18843,18853,18893,18916,18934,18935,19143,19211,19212,20141,20142,20143,20144,20190,20196,20205,20207,20208,20210,20298,20299,20304,20305,20306,20330,20335,19949,20451,20455,20465,20501,20468,1432,2319,2321,2778,6941,6942,6943,8114,8786,8787,10177,10178,10272,10274,10275,10277,11050,11367,11639,11762,11861,11867,12156,13091,13092,13106,13159,13461,13860,13983,14423,14600,14654,14651,14681,14685,15046,15149,15152,15157,15158,15185,15186,15344,15548,15549,15550,15764,15890,15912,15911,15893,16076,16077,16124,17840,17855,16131,16194,16309,17064,17400,17639,17831,17638,17780,17748,19249,18166,19498,19251,19486,18216,19499,19495,19301,19912,19913,19915,19916,20033,20221,20253,20255,20413,20410,20411,20412,19500,17764,18093,18987,18992,18990,14672,14672,16144,16142,15808,15808,15808,15808,13701,13701,16167,2454,7269,10277,13106,14254,14255,14284,14585,15892,15852,17734,17219,17751,17218,17396,18169,19518,20248,20289,12158,12158,16355,15116,17632,17632,17633,14780,15349,14298,14298,14298,15297,15297,15793,15793,14482,14485,17769,17769,14791,17211,16185,16185,16185,15183,12280,660,660,566,566,565,15167,15167,15167,14653,14588,17744,14790,14790,14777,14777,24371,18059,16384,17079,16358,16358,22635,11575,11575,10685,14582,14584,14584,14584,15188,15188,16133,16133,16181,16181,14283,15423,12268,12270,11765,263,10679,15770,15777,15304,11150,11606,7632,15679,31819,4672,14257,12026,18807,15566,15207,13466,11877,14303,14221,23126,17299,11870,32416,12888,1748,24341,677,15900,33069,31378,11871,14219,33070,17742,15178,23610,32468,32473,15141,32797,14398,32808,14659,11868,18827,32777,32472,14671,14587,15046,19949,32419,17744,32780,32763,16089,15901,15117,15904,13036,14227,32790,14584,8573,854,29065,14397,14882,11001,14651,15769,10993,20034,17747,13863,14405,17745,2492,23637,14395,19485,9454,19484,17743,14591,17219,14404,17633,16176,9463,15038,660,566,14653,12167,4545,11490,9467,13749,17646,20567,567,15182,11323,12654,732,10518,10654,16128,13700,14081,2008,10199,15807,11333,1825,550,14420,11639,2716,19496,7857,18166,14402,10198,278,1824,2720,14602,15300,2317,14598,31282,2454,14065,2319,2098,2076,19499,19494,9081,14586,19480,10547,15380,23638,15159,10386,27646,2097,29333,2065,15791,14588,1823,15810,15195,19479,15792,22156,26827,15204,14485,9847,27351,30405,22596,16078,31514,2078,24132,13422,31115,14483,28534,16074,16091,14298,11540,13983,14481,15154,15895,11367,15349,2091,15161,2088,10559,15155,15158,27353,2093,14777,31494,2086,11050,17654,16076,15808,15429,15167,15295,15899,15294,18170,15196,15202,16133,15891,17652,17651,16090,15345,6943,6941,6942))) AND status=1) GROUP BY g.id) as foo
    [context] => /var/www/sld/data/www/site12/public_html/lib/php/cms_sql/class.php line 1984
)