Webasyst - mysql ошибка Expression 1 of ORDER BY clause is not in SELECT list, references column which is not in SELECT list; this is incompatible with DISTINCT
Материал из Wiki - Iphoster - the best ever hosting and support. 2005 - 2024
Версия от 18:19, 1 сентября 2020; Admin iph (обсуждение | вклад)
Webasyst - mysql ошибка Expression 1 of ORDER BY clause is not in SELECT list, references column which is not in SELECT list; this is incompatible with DISTINCT
Ошибка на сайте на движке Webasyst после обновления mysql до 5.7.x:
Query Error 3065: Expression #1 of ORDER BY clause is not in SELECT list, references column 'site.sp1.sort' which is not in SELECT list; this is incompatible with DISTINCT Query: SELECT DISTINCT p.*,p.id FROM shop_product p JOIN shop_set_products sp1 ON p.id = sp1.product_id WHERE (p.count > 0 || p.count IS NULL) AND p.status = 1 AND sp1.set_id = 'verh' ORDER BY sp1.sort ASC LIMIT 10
означает, что включен strict mode для MySQL. Решение - это отключить strict mode для mysql 5.7: