CLASS.DB OUTPUT:
ERROR: 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 '-60, 60' at line 16
CLASS.DB OUTPUT:
QUERY:
SELECT 
				t1.*,
				t1.id as product_id,
				t2.brand_name, 
				t2.brand_website, 
				t3.unit_name,
				DATE_FORMAT(t1.created, '%d.%m.%Y') as created2,
				IF(t1.name_et != '', t1.name_et, t1.name_et) as name,
				IF(t1.description_et != '', t1.description_et, t1.description_et) as description,
				IF(t1.url_code_et != '', t1.url_code_et, t1.url_code_et) as url_code,
				IF(price_discount > 0 AND price_discount < price, price_discount, price) as current_price,
				IF(price_discount > 0 AND price_discount < price, 1, 0) as is_discounted,
				(SELECT fk_category_id FROM mdl_shop_product_category WHERE fk_product_id = t1.id ORDER BY fk_category_id DESC LIMIT 1) as main_cat_id,
				(SELECT COUNT(*) FROM mdl_shop_product_files WHERE type='image' AND fk_product_id = t1.id LIMIT 1) as images_count FROM mdl_shop_products AS t1
			LEFT JOIN mdl_shop_brands AS t2 ON t1.fk_brand_id = t2.id
			LEFT JOIN mdl_shop_units AS t3 ON t1.fk_unit_id = t3.id WHERE t1.active = 1 AND t1.deleted = 0 AND name_et != '' AND t1.id IN ('9','1264','1298','1308','1309','1313','1314','1315','1319','1320','1325','1333','1345','1404','1405','1408','1409','1412','1413','1416','1418','1419','1421','1422','1425','1426','1429','1430','1431','1432','1436','1437','1438','1444','1445','1451','1452','1453','1454','1455','1468','1473','1480','1481','1482','1483','1484','1485','1486','1487','1488','1489','1490','1491','1494','1495','1496','1497','1498','1499','1500','1501','1502','1503','1517','1518','1533','1534','1535','1536','1537','1538','1540','1550','1551','1554','1555','1558','1559','1562','1563','1567','1568','1572','1573','1576','1577','1581','1582','1585','1586','1589','1590','1598','1599','1600','1607','1608','1612','1613','1617','1618','1622','1623','1624','1626','1627','1630','1631','1634','1635','1639','1640','1644','1645','1651','1652','1653','1655','1656','1659','1660','1664','1667','1668','1674','1678','1683','1686','1692','1711','1714','1717','1718','1755','1756','1760','1761','1766','1781','1782','1783','1784','1785','1786','1791','1793','1794','1798','1826','1829','1839','1843','1844','1845','1846','1849','1852','1855','1864','1881','1882','1883','1895','1908','1913','1918','1919','1975','1985','2016','2026','2035','2049','2050','2135','2136','2137','2138','2139','2140','2141','2142','2143','2144','2145','2146','2147','2148','2149','2150','2151','2152','2154','2231','2239','2257','2269','2297','2303','2309','2311','2312','2354','2366','2373','2379','2385','2390','2401','2409','2416','2420','2425','2432','2438','2444','2451','2456','2461','2481','2486','2489','2498','2502','2507','2508','2536','2537','2538','2539','2540','2541','2542','2543','2547','2548','2552','2553','2554','2555','2556','2557','2558','2559','2560','2561','2562','2563','2564','2600','2604','2608','2612','2616','2623','2627','2630','2633','2638','2641','2647','2652','2657','2660','2663','2683','2684','2688','2691','2694','2697','2701','2704','2708','2711','2714','2717','2723','2728','2731','2735','2740','2747','2753','2766','2767','2772','2778','2783','2790','2838','2841','2844','2847','2850','2854','2859','2862','2865','2868','2871','2874','2875','2881','2885','2889','2893','2896','2899','2902','2905','2909','2913','2916','2931','3100','3110','3116','3160','3161','3181','3191','3217','3240','3241','3245','3246','3273','3278','3281','3310','3318','3319','3322','3328','3329','3334','3335','3337','3338','3339','3377','3426','3427','3433','3434','3436','3439','3443','3455','3479','3480','3499','3500','3501','3512','3525','3526','3527','3533','3534','3547','3553','3554','3562','3566','3567','3575','3578','3579','3580','3581','3585','3586','3587','3588','3589','3590','3601','3602','3607','3608','3610','3611','3612','3613','3635','3636','3647','3648','3683','3684','3685','3692','3693','3694','3756','3773','3782','3788','3789','3796','3797','3808','3809','3835','3859','3860','3861','3880','3881','3882','4076','4078','4081','4083','4084','4089','4090','4091','4096','4097','4098','4103','4104','4105','4108','4109','4110','4112','4113','4114','4115','4116','4118','4123','4128','4129','4131','4136','4137','4138','4143','4144','4145','4149','4150','4151','4157','4158','4159','4164','4165','4166','4175','4176','4182','4183','4191','4192','4199','4200','4201','4203','4204','4213','4214','4215','4221','4222','4223','4224','4232','4233','4238','4239','4240','4241','4248','4249','4250','4251','4268','4269','4270','4275','4276','4279','4280','4283','4284','4287','4288','4292','4293','4299','4300','4305','4306','4310','4311','4312','4314','4315','4316','4320','4321','4322','4325','4326','4327','4331','4332','4333','4334','4335','4336','4337','4340','4341','4342','4344','4345','4346','4347','4350','4351','4352','4431','4432','4433','4434','4435','4449','4450','4451','4458','4462','4492','4510','4521','4522','4523','4524','4525','4526','4527','4528','4529','4530','4531','4532','4533','4534','4535','4536','4537','4538','4539','4540','4541','4542','4543','4544','4546','4547','4548','4549','4550','4551','4552','4553','4554','4558','4559','4560','4561','4579','4580','4582','4583','4584','4585','4586','4587','4588','4589','4593','4594','4596','4597','4598','4599','4601','4602','4612','4613','4614','4782','4783','4786','4791','4792','4793','4798','4849','4852','4857','4858','4859','4864','4865','4866','4871','4875','4882','4887','4894','4901','4902','4903','4904','4905','4906','4907','4908','4909','4910','4911','4912','4913','4914','4915','4916','4918','4942','4943','4981','4982','4983','4984','4985','4986','4991','4992','4993','4994','4995','4996','5007','5008','5027','5038','5049','5052','5057','5058','5080','5081','5082','5083','5084','5085','5087','5088','5089','5090','5121','5123','5127','5129','5133','5135','5139','5140','5141','5148','5149','5150','5156','5158','5160','5162','5170','5172','5173','5180','5181','5185','5186','5247','5272','5280','5281','5284','5285','5304','5310','5312','5379','5380','5381','5390','5403','5438','5454','5493','5498','5502','5506','5507','5509','5512','5533','5537','5542','5552','5553','5554','5574','5619','5620','5622','5661','5670','5673','5679','5680','5684','5687','5689','5691','5692','5693','5696','5706','5711','5713','5714','5719','5725','5726','5727','5755','5757','5799','5801','5803','5804','5805','5909','5912','5917','5918','5921','5922','5925','5926','5929','5930','5931','5934','5935','5936','5943','5945','5946','5947','5948','5949','5950','5951','5952','5953','5957','5958','5959','5960','5961','5962','5963','5964','5967','5968','5969','5970','5971','5972','5973','5974','5975','5976','5977','5978','5979','5980','5981','5982','5983','5984','5985','5986','5987','5988','5989','5990','5991','5993','5994','5997','5998','6000','6001','6043','6058','6059','6064','6071','6072','6153','6184','6218','6219','6243','6245','6246','6249','6250','6253','6256','6257','6259','6262','6263','6264','6265','6266','6268','6270','6281','6291','6294','6297','6298','6299','6300','6309','6310','6316','6317','6318','6319','6323','6326','6328','6329','6330','6331','6332','6333','6334','6336','6337','6348','6349','6350','6351','6352','6353','6354','6364','6365','6373','6379','6384','6389','6390','6394','6399','6405','6416','6425','6435','6436','6439','6440','6458','6459','6460','6461','6462','6463','6474','6475','6476','6477','6478','6479','6480','6481','6503','6504','6513','6514','6515','6516','6517','6518','6521','6522','6524','6525','6543','6544','6545','6546','6547','6548','6551','6552','6553','6554','6555','6556','6557','6558','6559','6560','6564','6568','6569','6570','6578','6587','6593','6594','6601','6602','6609','6610','6611','6612','6613','6614','6615','6616','6621','6629','6630','6631','6632','6633','6636','6637','6641','6642','7022','7023','7052','7053','7057','7058','7059','7062','7063','7064','7065','7070','7075','7085','7086','7097','7098','7100','7101','7107','7138','7139','7146','7147','7148','7149','7159','7160','7161','7172','7173','7175','7176','7180','7183','7186','7190','7191','7196','7197','7203','7204','7215','7219','7222','7229','7233','7236','7239','7244','7247','7250','7253','7257','7269','7270','7279','7280','7291','7298','7299','7313','7321','7322','7329','7333','7338','7343','7351','7355','7356','7364','7369','7382','7383','7389','7397','7404','7409','7413','7417','7424','7437','7446','7450','7463','7475','7478','7479','7485','7490','7496','7497','7500','7506','7508','7512','7522','7526','7528','7532','7543','7544','7564','7569','7586','7587','7588','7589','7590','7591','7592','7593','7594','7595','7596','7597','7598','7599','7600','7601','7602','7604','7605','7606','7607','7608','7609','7610','7611','7612','7613','7614','7615','7616','7617','7618','7619','7620','7621','7624','7625','7626','7627','7628','7629','7630','7631','7632','7633','7634','7635','7636','7637','7638','7639','7640','7641','7642','7643','7648','7655','7656','7657','7668','7671','7713','7716','7733','7734','7735','7736','7738','7739','7742','7765','7770','7771','7786','7792','7795','7809','7816','7820','7822','7830','7831','7832','7833','7834','7835','7836','7840','7841','7842','7843','7844','7849','7850','7852','7854','7855','7856','7857','7858','7859','7862','7863','7864','7865','7866','7869','7870','7879','7887','7888','7889','7890','7894','7907','7908','7909','7920','7921','7922','7923','7938','7939','7940','7943','7944','7969','7970','7971','7972','7973','7974','8032','8033','8040','8045','8046','8063','8064','8065','8066','8110','8118','8119','8120','8124','8125','8126','8128','8129','8134','8163','8172','8173','8175','8176','8177','8182','8183','8184','8185','8190','8191','8194','8201','8207','8208','8209','8221','8235','8239','8244','8250','8251','8262','8268','8274','8275','8294','8303','8304','8311','8317','8318','8322','8323','8324','8325','8326','8327','8328','8329','8331','8332','8335','8355','8358','8360','8361','8362','8363','8364','8365','8366','8367','8368','8369','8370','8371','8372','8373','8374','8375','8376','8377','8378','8379','8380','8381','8382','8383','8384','8385','8386','8387','8388','8389','8390','8391','8392','8393','8394','8395','8396','8397','8398','8399','8400','8401','8474','8475','8477','8478','8479','8480','8481','8482','8483','8484','8485','8486','8487','8488','8490','8491','8492','8493','8494','8495','8496','8497','8498','8499','8500','8501','8502','8503','8504','8505','8506','8507','8508','8509','8510','8511','8512','8513','8514','8515','8516','8517','8518','8519','8520','8521','8522','8523','8524','8525','8529','8530','8531','8532','8533','8534','8535','8536','8537','8538','8539','8540','8541','8542','8543','8544','8545','8546','8547','8548','8549','8550','8551','8552','8553','8554','8555','8556','8557','8558','8559','8560','8561','8562','8563','8565','8567','8568','8569','8570','8571','8572','8573','8574','8575','8576','8577','8578','8579','8580','8581','8582','8583','8584','8585','8586','8587','8588','8589','8590','8591','8592','8593','8594','8595','8596','8597','8598','8599','8600','8601','8602','8603','8604','8605','8606','8607','8608','8609','8610','8611','8612','8613','8614','8615','8616','8617','8618','8619','8620','8621','8622','8623','8626','8627','8628','8629','8630','8631','8632','8633','8634','8636','8637','8638','8639','8640','8641','8642','8643','8644','8645','8646','8647','8648','8649','8650','8651','8652','8653','8654','8656','8657','8658','8660','8661','8662','8663','8664','8665','8666','8667','8668','8669','8670','8671','8672','8673','8674','8675','8676','8677','8678','8679','8680','8681','8682','8683','8684','8685','8686','8687','8688','8689','8690','8691','8692','8693','8694','8710','8711','8712','8713','8715','8716','8719','8720','8721','8722','8723','8724','8736','8743','8744','8745','8746','8771','8772','8783','8784','8796','8797','8810','8811','8812','8817','8818','8823','8824','8825','8829','8867','8868','8875','8876','8884','8887','8888','8900','8902','8912','8914','8936','8940','8957','8959','8964','8995','8997','9000','9006','9007','9014','9022','9025','9026','9041','9049','9076','9080','9084','9085','9109','9111','9112','9117','9124','9147','9184','9187','9208','9209','9222','9229','9233','9259','9260','9261','9267','9272','9277','9280','9281','9287','9296','9297') ORDER BY priority DESC, id DESC LIMIT -60, 60