Jump to content
  • разработка интернет магазинов на opencart
  • доработка интернет магазинов на opencart

Проблема с SQL


Recommended Posts

Всем привет!

Делал свой отчет для Opencart 2.3, сейчас хотел потестить его на Opencart 3 и словил ошибку SQL.

 

Запрос

SELECT descr.`name` as Velo_Name, Orders.`model` as Model, SUM(Orders.`quantity`) as Sum_Quantity, SUM(Orders.`price`) as Sum_Price FROM `oc_order_product` as Orders, `oc_product` AS prod, `oc_product_description` as descr WHERE (Orders.product_id = prod.product_id) AND (prod.product_id=descr.product_id) AND (descr.`language_id` = 1) GROUP BY Orders.`model` ORDER BY SUM(Orders.`price`) DESC

 

Код ошибки

 

#1055 - Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'opencart3.descr.name' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by

 

 

Врогде английским влагдею, а что гделать не знаю :(

 

И почему-то на версии 2.3 все рилиило, а на 3 версии нет.

Link to comment
Share on other sites


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.