Hello, I am getting this error, in database errors log:
Bază de date (eroare) Eroare:Unknown column 'sales_discount' in 'order clause' (1054) Întrebare:SELECT SQL_CALC_FOUND_ROWS products.product_id, IF(shared_descr.product_id IS NOT NULL, shared_descr.product, descr1.product) as product, SUM(cscart_product_sales.amount) as sales_amount FROM cscart_products as products LEFT JOIN cscart_product_descriptions as descr1 ON descr1.product_id = products.product_id AND descr1.lang_code = 'ro' LEFT JOIN cscart_product_prices as prices ON prices.product_id = products.product_id AND prices.lower_limit = 1 INNER JOIN cscart_products_categories as products_categories ON products_categories.product_id = products.product_id INNER JOIN cscart_categories ON cscart_categories.category_id = products_categories.category_id AND (cscart_categories.usergroup_ids = '' OR FIND_IN_SET(0, cscart_categories.usergroup_ids) OR FIND_IN_SET(1, cscart_categories.usergroup_ids)) AND cscart_categories.status IN ('A', 'H') LEFT JOIN cscart_ult_product_descriptions shared_descr ON shared_descr.product_id = products.product_id AND shared_descr.company_id = 1 AND shared_descr.lang_code = 'ro' INNER JOIN cscart_product_sales ON cscart_product_sales.product_id = products.product_id AND cscart_product_sales.category_id = products_categories.category_id WHERE 1 AND cscart_categories.company_id = 1 AND (products.usergroup_ids = '' OR FIND_IN_SET(0, products.usergroup_ids) OR FIND_IN_SET(1, products.usergroup_ids)) AND products.status IN ('A') AND prices.usergroup_id IN (0, 0, 1) AND cscart_product_sales.amount >= 1 GROUP BY cscart_product_sales.product_id ORDER BY sales_discount asc, product_id ASC LIMIT 120, 24
I have some other errors, the error appear once a day, not often:
Bază de date (eroare) Eroare: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 'asc, product_id ASC LIMIT 0, 24' at line 1 (1064) Întrebare:SELECT SQL_CALC_FOUND_ROWS products.product_id, IF(inventory.product_code LIKE '%foto kodak glossy%', inventory.combination, null) AS combination, IF(shared_descr.product_id IS NOT NULL, shared_descr.product, descr1.product) as product FROM cscart_products as products LEFT JOIN cscart_product_options_inventory as inventory ON inventory.product_id = products.product_id LEFT JOIN cscart_product_descriptions as descr1 ON descr1.product_id = products.product_id AND descr1.lang_code = 'ro' LEFT JOIN cscart_product_prices as prices ON prices.product_id = products.product_id AND prices.lower_limit = 1 INNER JOIN cscart_products_categories as products_categories ON products_categories.product_id = products.product_id INNER JOIN cscart_categories ON cscart_categories.category_id = products_categories.category_id AND (cscart_categories.usergroup_ids = '' OR FIND_IN_SET(0, cscart_categories.usergroup_ids) OR FIND_IN_SET(1, cscart_categories.usergroup_ids)) AND cscart_categories.status IN ('A', 'H') LEFT JOIN cscart_ult_product_descriptions shared_descr ON shared_descr.product_id = products.product_id AND shared_descr.company_id = 1 AND shared_descr.lang_code = 'ro' WHERE 1 AND (((descr1.search_words LIKE '%foto kodak glossy%') OR descr1.product LIKE '%foto kodak glossy%' OR descr1.short_description LIKE '%foto kodak glossy%' OR descr1.short_description LIKE '%foto kodak glossy%' OR descr1.full_description LIKE '%foto kodak glossy%' OR descr1.full_description LIKE '%foto kodak glossy%' OR (descr1.meta_keywords LIKE '%foto kodak glossy%' OR descr1.meta_description LIKE '%foto kodak glossy%') OR inventory.product_code LIKE '%foto kodak glossy%' OR products.product_code LIKE '%foto kodak glossy%')) AND cscart_categories.company_id = 1 AND (products.usergroup_ids = '' OR FIND_IN_SET(0, products.usergroup_ids) OR FIND_IN_SET(1, products.usergroup_ids)) AND products.status IN ('A') AND prices.usergroup_id IN (0, 0, 1) GROUP BY products.product_id ORDER BY asc, product_id ASC LIMIT 0, 24