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 46
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, IF(p_type.type_et != '', 
								p_type.type_et, 
									p_type.type_et
							
							) as param_type
, IF(p_material.material_et != '', 
								p_material.material_et, 
									p_material.material_et
							
							) as param_material
, IF(p_color.color_et != '', 
								p_color.color_et, 
									p_color.color_et
							
							) as param_color
, IF(p_moisture_resistance.moisture_resistance_et != '', 
								p_moisture_resistance.moisture_resistance_et, 
									p_moisture_resistance.moisture_resistance_et
							
							) as param_moisture_resistance
, IF(p_availability.availability_et != '', 
								p_availability.availability_et, 
									p_availability.availability_et
							
							) as param_availability
 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 LEFT JOIN mdl_shop_params_type as p_type ON t1.fk_type_id = p_type.id
 LEFT JOIN mdl_shop_params_material as p_material ON t1.fk_material_id = p_material.id
 LEFT JOIN mdl_shop_params_color as p_color ON t1.fk_color_id = p_color.id
 LEFT JOIN mdl_shop_params_moisture_resistance as p_moisture_resistance ON t1.fk_moisture_resistance_id = p_moisture_resistance.id
 LEFT JOIN mdl_shop_params_availability as p_availability ON t1.fk_availability_id = p_availability.id
 WHERE t1.active = 1 AND t1.deleted = 0 AND name_et != '' AND t1.id IN ('1816','1820','1823','1824','1826','1846','1847','1848','1849','1854','1855','1856','1857','1858','1859','1860','1861','1862','1863','1864','1866','1867','1868','1869','1870','1871','1872','1873','1875','1876','1877','1878','1879','1880','1881','1882','1883','1887','1888','1889','1890','1891','1892','1893','1894','1895','1896','1897','1898','1899','1900','1901','1922','1923','1941','1942','1943','1944','1947','1948','1949','1950','1951','1952','1953','1954','1956','1957','1958','1959','1960','1969','1970','1971','1972','1973','1975','1982','1983','1986','1987','1989','1990','1991','1992','1993','1994','1995','1996','1997','1998','1999','2000','2001','2002','2003','2004','2005','2009','2010','2011','2012','2013','2014','2016','2027','2028','2031','2032','2033','2034','2035','2036','2037','2038','2039','2040','2041','2042','2043','2044','2045','2046','2047','2048','2049','2050','2051','2052','2053','2054','2055','2056','2058','2059','2060','2061','2062','2063','2064','2065','2066','2067','2068','2069','2070','2071','2072','2073','2074','2075','2076','2077','2078','2079','2080','2081','2082','2083','2084','2085','2086','2087','2088','2089','2090','2091','2092','2093','2094','2095','2096','2097','2098','2099','2100','2101','2102','2103','2104','2105','2106','2107','2108','2109','2110','2111','2112','2113','2114','2115','2116','2117','2118','2119','2120','2121','2122','2123','2124','2125','2126','2127','2128','2129','2130','2131','2132','2133','2134','2135','2136','2137','2138','2139','2140','2141','2142','2143','2144','2145','2146','2147','2148','2149','2150','2151','2152','2154','2155','2156','2157','2158','2159','2160','2161','2162','2163','2164','2165','2166','2167','2168','2169','2170','2171','2172','2173','2174','5143','5144','5145','5146','5147','5148','5151','5152','5155','5156','5157','5158','5159','5161','5165','5167','5169','5170','5171','5174','5176','6058','6059','6070','6107','8843','9929','11662','11663','11664','11665','11725','11726','11727','11728','11729','11730','11731','11732','11733','12087','12088','12089','12090','12091','12092','12093','12094','12095','12096','12672','12677','12852','12853','12854','12855','13749') ORDER BY priority DESC, id DESC LIMIT -60, 60