Dotaz:
SELECT SQL_CALC_FOUND_ROWS P.id, PL.name, PL.uri, P.vat, P.category_id, HL.uri AS category_uri, P.status_2, P.status_3, P.status_4, P.status_9, P.status_10, P.size, PL.description, PL.description2, P.total_stock_quantity
FROM product P
INNER JOIN product_lang PL ON PL.product_id = P.id
INNER JOIN htree H ON H.id = P.category_id
INNER JOIN htree_lang HL ON HL.category_id = H.id
LEFT JOIN product_multicategory PM ON P.id = PM.product_id
WHERE P.category_id NOT IN (0) AND H.active = 1 AND P.active = 1 AND P.deleted = 0 AND PL.forbidden = 0 AND PL.shop_id = 2 AND HL.forbidden = 0 AND HL.shop_id = 2 AND P.id IN (1917,1918,1919,1920,1921,1922,1923,1925,1933,1936,1939,3897,3898,3899,3900,4653,4654,4656,4657,4660,5686,6845,6845,6845,6845,6845,6845,6845,6845,6845,6845,6847,6847,6848,6848,6898,6904,6904,7330,7331,7333,7336,7337,7338,7340,7341,7342,7357,8625,8625,8625,8626,8627,8633,8634,9022,9022,9022,9022,11929,11930,11931,11932,11933,11934,11935,11936,12080,12082,13654,13655,13745,13750,13926,14651,14677,14681,14682,14683,14684,14686,14686,14687,14688,15257,15260,16001,16001,16002,16003,16003,16003,16010,16011,16615,16676,16677,16679,16681,16683,16684,16685,16686,16686,16686,16687,16688,16689,16690,16691,16695,16703,16707,16708,16711,17519,17519,17548,17549,17550,17550,17550,17551,17551,17551,17552,19566,19576,19577,19578,19582,19585,19587,20603,20605,22306,22307,22644,22645,22647,22649,22650,22651,22652,22653,22669,22671,28345,29267,30173,30173,30174,30175,30176,30177,34670,34671,34672,34673,34886,34887,34888,34913,34915,34916,34917,34918,34953,34963,34964,34965,34966,34967,34968,34969,38373,42402,42431,42433,42437,42437,42441,42442,42443,42443,42443,42451,42451,42452,42452,42453,42454,42455,42455,42455,42456,42457,42458,42459,42460,42461,42462)
GROUP BY P.id
ORDER BY
P.status_9,
P.total_stock_quantity DESC
LIMIT -196, 28
Chyba: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '-196, 28' at line 13