SQL: SELECT SQL_CACHE SQL_CALC_FOUND_ROWS product.id AS id, product.id_product_group, product.is_configuration AS is_configuration, IF(product.is_configuration = 1, (SELECT GROUP_CONCAT(CONCAT(product_configuration.id_product_configuration,'-',product_configuration.id_category,'-',product_configuration.required) ORDER BY product_configuration.id_product_configuration SEPARATOR '|') FROM product_configuration LEFT JOIN product product_alt ON product_alt.id = product_configuration.id_product_configuration LEFT JOIN product_visible ON product_visible.id_product = product_configuration.id_product AND product_visible.id_domain = 1 WHERE product_configuration.id_product = product.id AND product_configuration.id_domain = '1' AND product_visible.visible = 1 AND product_alt.deleted = 0 GROUP BY product_configuration.id_product), 'na' ) AS id_products_included, IF(product.is_configuration = 1, COALESCE((SELECT GROUP_CONCAT(product_configuration.id_product_configuration ORDER BY product_configuration.id_product_configuration SEPARATOR '|') FROM product_configuration LEFT JOIN product product_alt ON product_alt.id = product_configuration.id_product_configuration LEFT JOIN product_visible ON product_visible.id_product = product_configuration.id_product AND product_visible.id_domain = 1 WHERE product_configuration.id_product = product.id AND product_configuration.id_domain = '1' AND product_visible.visible = 1 AND product_alt.deleted = 0 GROUP BY product_configuration.id_product),'na'), 'na' ) AS product_ids_included, category_product.id_category AS id_category, COALESCE(product_lang.title, product_lang_alt.title) AS title, COALESCE(product_lang.rewrite_title, product_lang_alt.rewrite_title) AS rewrite_title, COALESCE(product_lang.description, product_lang_alt.description) AS description, COALESCE(product_lang.short_description, product_lang_alt.short_description) AS short_description, product.user_code AS user_code, product.quantity AS quantity, product.id_producer, product_extras.discount AS product_discount, product_extras.discount_type AS product_discount_type, product_extras.fixed_price AS fixed_price, IF( (SELECT COUNT(*) FROM price WHERE price.id_price_type = 1 AND price.id_domain = 1 AND id_product = product.id) = 0 AND (SELECT COUNT(*) FROM price WHERE price.id_price_type = 1 AND price.id_domain = 1 AND id_product = product.id) = 0, 0, COALESCE( (SELECT value FROM price WHERE price.id_price_type = 1 AND price.id_domain = 1 AND id_product = product.id), (SELECT value FROM price WHERE price.id_price_type = 1 AND price.id_domain = 1 AND id_product = product.id)) ) AS price, vat.rate AS vat, IF( (SELECT COUNT(*) FROM price WHERE price.id_price_type = 2 AND price.id_domain = 1 AND id_product = product.id) = 0, 0, (SELECT value FROM price WHERE price.id_price_type = 2 AND price.id_domain = 1 AND id_product = product.id) ) AS normal_price, normal_vat.rate AS normal_vat, IF( (SELECT COUNT(*) FROM price WHERE price.id_price_type = 1 AND price.id_domain = 1 AND id_product = product.id) = 0, 0, (SELECT value FROM price WHERE price.id_price_type = 1 AND price.id_domain = 1 AND id_product = product.id)) AS price_fixed, image.url AS image, product.id AS order_by, product.minimum_quantity AS minimum_quantity, IF(pref_alt.action = 1 AND ((pref_alt.action_from IS NULL OR pref_alt.action_from >= NOW()) AND (pref_alt.action_to IS NULL OR pref_alt.action_to <= NOW())), product_extras.action_price, 0) AS action_price FROM product LEFT JOIN preference AS pref_alt ON pref_alt.id_product = product.id LEFT JOIN product_lang ON product_lang.id_product = product.id AND product_lang.id_lang = 1 LEFT JOIN product_lang AS product_lang_alt ON product_lang.id_lang IS NULL AND product_lang_alt.id_product = product.id AND product_lang_alt.id_lang = 1 LEFT JOIN product_extras ON product_extras.id_product = product.id LEFT JOIN price ON price.id_product = product.id AND price.id_price_type = 1 LEFT JOIN price AS price_alt ON price.id_product IS NULL AND price_alt.id_product = product.id AND price_alt.id_price_type = 1 INNER JOIN vat ON vat.id = COALESCE(price.id_vat, price_alt.id_vat) LEFT JOIN price AS normal_price ON normal_price.id_product = product.id AND normal_price.id_price_type = 2 LEFT JOIN vat AS normal_vat ON normal_vat.id = normal_price.id_vat LEFT JOIN image ON image.id_product = product.id AND image.head = 1 INNER JOIN category_product ON category_product.id_product = product.id AND category_product.id_category IN () INNER JOIN category ON category_product.id_category = category.id AND category.visible = 1 LEFT JOIN product_visible ON product_visible.id_product = product.id AND product_visible.id_domain = 1 INNER JOIN preference ON preference.id_product = product.id AND (preference.news = 1 OR (preference.news_from <= NOW() AND preference.news_to >= NOW())) AND preference.sale != 1 WHERE 1=1 AND product_visible.visible = 1 AND product.deleted = 0 AND (1=1) AND (product.valid_until IS NULL OR product.valid_until > NOW()) GROUP BY product.id_product_group ORDER BY order_by DESC, RAND() LIMIT 0, 3
Fatal error: Uncaught exception 'MysqlException' with message 'You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') INNER JOIN category ON category_product.id_category = ' at line 116 in SELECT SQL_CACHE SQL_CALC_FOUND_ROWS product.id AS id, product.id_product_group, product.is_configuration AS is_configuration, IF(product.is_configuration = 1, (SELECT GROUP_CONCAT(CONCAT(product_configuration.id_product_configuration,'-',product_configuration.id_category,'-',product_configuration.required) ORDER BY product_configuration.id_product_configuration SEPARATOR '|') FROM product_configuration LEFT JOIN product product_alt ON product_alt.id = product_configuration.id_product_configuration LEFT JOIN product_visible ON product_visible.id_product = product_configuration.id_product AND product_visible.id_d in /home/kolokram_cz/public_html/cms/inc/class/db/db.php on line 132