[email protected]    +32 (0)3 369 94 09    Point de collecte à Schelle

Database Error

Error: SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'Brand.name' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by

SQL Query: SELECT name as value, id, sum(count) as count FROM (SELECT Brand.name as name, Brand.id as id, count(DISTINCT Productgroup.id) as count FROM productgroups as Productgroup RIGHT JOIN category_groups AS CategoryGroup ON (CategoryGroup.group_id = Productgroup.id) RIGHT JOIN descriptions AS Description ON (Description.group_id = Productgroup.id) LEFT JOIN i18n AS I18n__name__fra ON (Productgroup.id = I18n__name__fra.foreign_key AND I18n__name__fra.model = 'Productgroup' AND I18n__name__fra.field = 'name' AND I18n__name__fra.locale = 'fra') RIGHT JOIN brands AS Brand ON (Productgroup.brand_id = Brand.id) WHERE CategoryGroup.category_id IN(75) AND CategoryGroup.group_model = 'Productgroup' AND Description.store_id = '10' AND Description.group_model = 'Productgroup' AND hidden = '' GROUP BY Brand.id UNION SELECT Brand.name as name, Brand.id as id, count(DISTINCT Bundle.id) as count FROM bundles as Bundle RIGHT JOIN category_groups AS CategoryGroup ON (CategoryGroup.group_id = Bundle.id) RIGHT JOIN descriptions AS Description ON (Description.group_id = Bundle.id) LEFT JOIN i18n AS I18n__name__fra ON (Bundle.id = I18n__name__fra.foreign_key AND I18n__name__fra.model = 'Bundle' AND I18n__name__fra.field = 'name' AND I18n__name__fra.locale = 'fra') RIGHT JOIN brands AS Brand ON (Bundle.brand_id = Brand.id) WHERE CategoryGroup.category_id IN(75) AND CategoryGroup.group_model = 'Bundle' AND Description.store_id = '10' AND Description.group_model = 'Bundle' AND hidden = '' GROUP BY Brand.id) as Brand GROUP BY Brand.id ORDER BY name

Notice: If you want to customize this error message, create app/View/Errors/pdo_error.ctp

Stack Trace

  • CORE/Cake/Model/Datasource/DboSource.php line 459PDOStatement->execute(array)
  • CORE/Cake/Model/Datasource/DboSource.php line 426DboSource->_execute(string, array)
  • CORE/Cake/Model/Datasource/DboSource.php line 669DboSource->execute(string, array, array)
  • CORE/Cake/Model/Datasource/DboSource.php line 538DboSource->fetchAll(string)
  • [internal function]DboSource->query(string)
  • CORE/Cake/Model/Model.php line 3058call_user_func_array(array, array)
  • APP/Model/Group.php line 717Model->query(string)
  • APP/Controller/CategoriesController.php line 276Group->filterBrands()
  • [internal function]CategoriesController->view(string, string, string)
  • CORE/Cake/Controller/Controller.php line 486ReflectionMethod->invokeArgs(CategoriesController, array)
  • CORE/Cake/Routing/Dispatcher.php line 187Controller->invokeAction(CakeRequest)
  • CORE/Cake/Routing/Dispatcher.php line 162Dispatcher->_invoke(CategoriesController, CakeRequest, CakeResponse)
  • APP/webroot/index.php line 109Dispatcher->dispatch(CakeRequest, CakeResponse)