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 ('6643','6645','6646','6647','6648','6649','6650','6651','6652','6653','6654','6655','6656','6657','6658','6659','6660','6661','6662','6663','6664','6665','6666','6667','6668','6669','6670','6671','6672','6673','6675','6676','6677','6678','6679','6680','6681','6682','6683','6684','6685','6686','6687','6688','6689','6690','6691','6692','6693','6694','6695','6696','6697','6698','6699','6700','6701','6702','6703','6704','6705','6706','6707','6708','6709','6710','6711','6712','6713','6714','6715','6716','6717','6718','6719','6720','6721','6722','6723','6724','6725','6726','6727','6728','6729','6730','6731','6732','6733','6734','6735','6736','6737','6738','6739','6740','6741','6742','6743','6744','6745','6746','6747','6748','6749','6750','6751','6752','6753','6754','6755','6756','6757','6758','6759','6760','6761','6762','6763','6764','6765','6766','6767','6768','6769','6770','6771','6772','6773','6774','6775','6776','6777','6778','6779','6780','6781','6782','6783','6785','6786','6788','6789','6790','6791','6792','6793','6794','6795','6796','6797','6798','6799','6800','6801','6802','6803','6804','6805','6806','6807','6808','6809','6810','6811','6812','6813','6814','6815','6816','6817','6818','6819','6820','6821','6822','6823','6824','6825','6826','6827','6828','6829','6830','6831','6832','6833','6834','6835','6836','6837','6838','6839','6840','6841','6842','6843','6845','6846','6847','6848','6849','6850','6851','6852','6853','6854','6855','6856','6857','6858','6859','6860','6862','6863','6864','6865','6866','6867','6869','6870','6871','6872','6873','6874','6875','6876','6877','6878','6879','6880','6881','6882','6883','6884','6885','6886','6887','6888','6889','6890','6891','6892','6893','6894','6895','6896','6897','6898','6899','6900','6901','6902','6903','6904','6905','6906','6907','6908','6909','6910','6911','6913','6914','6915','6916','6917','6918','6919','6920','6921','6922','6923','6924','6925','6926','6927','6928','6929','6931','6932','6933','6934','6935','6936','6937','6938','6939','6940','6941','6942','6943','6944','6945','6946','6947','6948','6949','6950','6951','6952','6953','6954','6955','6956','6957','6958','6959','6960','6961','6962','6963','6964','6965','6966','6967','6968','6969','6970','6971','6972','6973','6974','6975','6976','6977','6978','6979','6980','6981','6982','6983','6984','6985','6986','6987','6990','6991','6992','6993','6994','6995','6996','6997','6998','6999','7000','7001','7002','7003','7004','7005','7006','7007','7008','7009','7010','7011','7012','7013','7014','7015','7016','7017','7018','7019','7020','7021','7022','7023','7024','7025','7026','7027','7028','7029','7030','7031','7032','7033','7034','7035','7036','7038','7039','7040','7041','7042','7043','7044','7045','7046','7047','7049','7050','7051','7052','7053','7054','7055','7056','7057','7058','7059','7060','7061','7062','7063','7064','7065','7066','7067','7068','7069','7070','7071','7072','7073','7074','7075','7076','7077','7078','7079','7080','7081','7082','7083','7084','7085','7086','7087','7088','7089','7090','7091','7092','7093','7094','7095','7096','7097','7098','7100','7101','7102','7104','7105','7106','7107','7108','7109','7110','7112','7113','7114','7115','7116','7117','7119','7120','7121','7122','7123','7124','7125','7126','7127','7128','7129','7130','7131','7132','7134','7135','7136','7137','7138','7139','7140','7141','7142','7143','7144','7145','7146','7147','7148','7149','7150','7151','7152','7153','7154','7155','7156','7157','7158','7159','7160','7161','7162','7163','7164','7166','7167','7168','7169','7170','7171','7172','7173','7175','7176','7177','7178','7179','7180','7181','7182','7183','7184','7185','7186','7187','7188','7189','7190','7191','7192','7193','7194','7195','7196','7197','7198','7200','7201','7202','7203','7204','7205','7206','7207','7208','7209','7210','7211','7212','7213','7214','7215','7216','7217','7218','7219','7220','7221','7222','7223','7224','7225','7226','7227','7228','7229','7230','7231','7232','7233','7234','7235','7236','7237','7238','7239','7240','7241','7242','7243','7244','7245','7246','7247','7248','7249','7250','7251','7252','7253','7254','7255','7256','7257','7258','7259','7260','7261','7262','7263','7264','7265','7267','7268','7269','7270','7271','7272','7273','7274','7275','7276','7277','7279','7280','7281','7282','7283','7284','7285','7286','7287','7288','7289','7290','7291','7292','7293','7294','7295','7296','7297','7298','7299','7300','7301','7302','7303','7304','7305','7306','7307','7308','7310','7311','7312','7313','7314','7315','7316','7317','7318','7319','7320','7321','7322','7323','7324','7325','7326','7327','7328','7329','7330','7331','7332','7333','7334','7335','7336','7337','7338','7339','7340','7341','7342','7343','7344','7345','7346','7347','7348','7350','7351','7352','7353','7354','7355','7356','7357','7358','7359','7360','7361','7362','7363','7364','7365','7366','7367','7368','7369','7370','7371','7372','7373','7374','7375','7376','7377','7378','7379','7380','7381','7382','7383','7384','7385','7386','7387','7388','7389','7390','7391','7392','7393','7394','7395','7396','7397','7398','7399','7400','7401','7402','7403','7404','7405','7406','7407','7408','7409','7411','7412','7413','7414','7415','7416','7417','7418','7419','7420','7421','7422','7423','7424','7425','7426','7427','7428','7429','7430','7431','7432','7433','7434','7435','7436','7437','7438','7439','7440','7441','7442','7443','7444','7445','7446','7447','7448','7449','7450','7451','7452','7453','7455','7456','7457','7458','7459','7460','7461','7462','7463','7464','7465','7466','7467','7468','7469','7470','7471','7472','7473','7474','7475','7476','7477','7478','7479','7481','7482','7483','7484','7485','7486','7487','7488','7489','7490','7491','7492','7493','7494','7495','7496','7497','7498','7499','7500','7501','7502','7503','7504','7505','7506','7507','7508','7509','7510','7511','7512','7514','7515','7516','7517','7518','7519','7520','7521','7522','7523','7524','7525','7526','7527','7528','7529','7530','7531','7532','7533','7534','7535','7536','7537','7538','7539','7540','7541','7542','7543','7544','7545','7546','7547','7548','7549','7550','7553','7554','7555','7556','7557','7558','7559','7560','7561','7562','7563','7564','7565','7566','7567','7568','7569','7570','7571','7572','7573','7574','7575','7576','7577','7578','7579','7580','7581','7582','7583','7584','7585','7586','7587','7588','7589','7590','7591','7592','7593','7594','7595','7596','7597','7598','7599','7600','7601','7602','7603','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','7644','7645','7646','7647','7648','7649','7650','7651','7652','7653','7654','7655','7656','7657','7658','7659','7660','7661','7662','7663','7664','7665','7666','7667','7668','7669','7670','7671','7672','7673','7674','7675','7676','7677','7678','7679','7680','7681','7682','7683','7684','7685','7686','7687','7688','7689','7690','7691','7693','7694','7695','7696','7697','7699','7700','7701','7702','7703','7704','7705','7706','7707','7713','7714','7715','7716','7717','7718','7719','7720','7721','7722','7723','7724','7725','7726','7727','7728','7729','7730','7731','7732','7733','7734','7735','7736','7737','7738','7739','7740','7741','7742','7743','7744','7745','7746','7747','7748','7749','7750','7751','7752','7753','7754','7755','7756','7757','7758','7759','7760','7761','7762','7763','7764','7765','7766','7767','7768','7770','7771','7773','7774','7775','7776','7777','7778','7779','7780','7781','7782','7783','7784','7786','7787','7788','7789','7790','7791','7792','7793','7794','7795','7796','7797','7798','7799','7800','7801','7802','7803','7804','7805','7806','7807','7808','7809','7810','7811','7812','7813','7814','7815','7816','7817','7818','7819','7820','7821','7822','7823','7824','7825','7826','7827','7828','7829','7830','7831','7832','7833','7834','7835','7836','7837','7838','7839','7840','7841','7842','7843','7844','7845','7846','7847','7848','7849','7850','7851','7852','7853','7854','7855','7856','7857','7858','7859','7860','7861','7862','7863','7864','7865','7866','7867','7868','7869','7870','7871','7872','7873','7874','7875','7877','7878','7879','7880','7881','7882','7883','7884','7885','7886','7887','7888','7889','7890','7891','7892','7893','7894','7895','7896','7897','7898','7899','7901','7902','7903','7904','7905','7906','7907','7908','7909','7910','7911','7912','7913','7914','7915','7917','7918','7919','7920','7921','7922','7923','7924','7925','7926','7927','7928','7929','7930','7931','7932','7933','7934','7935','7936','7937','7938','7939','7940','7941','7942','7943','7944','7946','7947','7948','7949','7950','7951','7952','7954','7955','7956','7957','7958','7959','7960','7961','7962','7963','7964','7965','7966','7967','7968','7969','7970','7971','7972','7973','7974','7975','7976','7977','7978','7979','7980','7981','7982','7983','7984','7985','7986','7987','7988','7989','7990','7991','7992','7993','7994','7995','7996','7997','7998','7999','8000','8001','8002','8003','8004','8005','8006','8007','8008','8009','8010','8011','8013','8014','8015','8016','8017','8018','8019','8020','8021','8022','8023','8024','8025','8026','8027','8028','8029','8030','8031','8032','8033','8034','8035','8036','8037','8038','8039','8040','8041','8042','8043','8044','8045','8046','8047','8048','8049','8050','8051','8052','8053','8054','8055','8056','8057','8058','8059','8060','8062','8063','8064','8065','8066','8067','8068','8069','8070','8071','8072','8073','8074','8075','8076','8077','8078','8079','8080','8081','8082','8083','8084','8085','8086','8087','8088','8089','8090','8091','8092','8093','8094','8096','8098','8099','8100','8101','8102','8103','8104','8105','8106','8107','8108','8109','8110','8111','8112','8113','8114','8115','8116','8117','8118','8119','8120','8121','8122','8137','8138','8139','8140','8141','8142','8143','8144','8145','8146','8147','8148','8149','8150','8151','8152','8153','8154','8155','8156','8157','8158','8159','8160','8161','8162','8163','8164','8165','8166','8167','8168','8169','8170','8171','8172','8173','8175','8176','8177','8178','8179','8180','8181','8182','8183','8184','8185','8186','8187','8188','8189','8190','8191','8192','8193','8194','8195','8196','8197','8198','8199','8200','8201','8202','8203','8204','8205','8206','8207','8208','8209','8210','8211','8212','8213','8214','8215','8216','8217','8218','8219','8220','8221','8222','8223','8224','8225','8226','8227','8228','8229','8230','8231','8232','8233','8234','8235','8237','8238','8239','8240','8241','8242','8243','8244','8245','8246','8247','8248','8249','8250','8251','8252','8253','8254','8255','8256','8257','8258','8259','8260','8261','8262','8263','8264','8265','8266','8267','8268','8269','8270','8271','8272','8273','8274','8275','8276','8277','8278','8279','8282','8283','8284','8285','8286','8287','8288','8289','8290','8291','8292','8293','8294','8295','8296','8297','8298','8299','8300','8301','8302','8303','8304','8305','8306','8307','8308','8309','8310','8311','8312','8313','8314','8315','8317','8318','8319','8320','8321','8322','8323','8324','8325','8326','8327','8328','8329','8330','8331','8332','8333','8334','8335','8336','8337','8338','8339','8340','8341','8342','8343','8344','8345','8346','8347','8348','8349','8350','8351','8352','8353','8354','8355','8356','8357','8358','8359','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','8402','8403','8404','8405','8406','8407','8408','8409','8410','8411','8412','8413','8415','8416','8417','8418','8419','8420','8421','8422','8423','8424','8425','8426','8427','8428','8429','8430','8431','8432','8433','8434','8435','8436','8437','8438','8439','8440','8441','8442','8443','8444','8445','8446','8448','8449','8450','8451','8452','8453','8454','8455','8456','8457','8458','8459','8460','8461','8462','8463','8464','8465','8466','8467','8468','8469','8470','8471','8472','8473','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','8526','8528','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','8695','8696','8697','8698','8699','8700','8701','8703','8704','8705','8706','8707','8708','8709','8710','8711','8712','8713','8714','8715','8716','8717','8718','8719','8720','8721','8722','8723','8724','8725','8726','8727','8728','8729','8730','8731','8733','8734','8735','8736','8737','8738','8739','8740','8741','8742','8743','8744','8745','8746','8747','8748','8750','8751','8752','8754','8756','8758','8759','8765','8766','8767','8768','8769','8770','8771','8772','8773','8774','8775','8776','8777','8779','8780','8781','8782','8783','8784','8785','8786','8787','8788','8789','8790','8791','8792','8793','8794','8795','8796','8797','8798','8799','8800','8801','8802','8803','8804','8805','8806','8807','8808','8809','8810','8811','8812','8813','8814','8815','8816','8817','8818','8819','8820','8821','8822','8823','8824','8825','8826','8827','8829','8830','8831','8832','8833','8834','8835','8836','8857','8858','8859','8860','8861','8862','8864','8865','8866','8867','8868','8869','8870','8871','8872','8873','8874','8875','8876','8877','8878','8879','8880','8881','8882','8883','8884','8885','8886','8887','8888','8889','8890','8892','8893','8894','8895','8896','8897','8898','8899','8900','8901','8902','8903','8904','8905','8906','8907','8908','8909','8910','8911','8912','8913','8914','8915','8916','8917','8918','8919','8920','8921','8922','8923','8924','8925','8926','8927','8928','8929','8930','8931','8932','8933','8934','8936','8937','8938','8939','8940','8941','8942','8945','8947','8948','8949') ORDER BY priority DESC, id DESC LIMIT -60, 60