Database_Exception [ 1064 ]: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ') and `products`.`enabled` = '1' and `products`.`status` IN (1,2,3) ...' at line 4 [ SELECT `brands`.*, `brands`.`name` as value FROM `products_categories` LEFT JOIN `products` ON `products`.`id` = `products_categories`.`product_id` LEFT JOIN `brands` on `products`.`brand_id` = `brands`.`id` WHERE `category_id` IN () and `products`.`enabled` = '1' and `products`.`status` IN (1,2,3) GROUP by `brands`.`id` ORDER BY `brands`.`name` ASC, `brands`.`sort` ASC ]

MODPATH/mysqli/classes/Database/MySQLi.php [ 174 ]

169 			{
170 				// This benchmark is worthless
171 				Profiler::delete($benchmark);
172 			}
173 
174 			throw new Database_Exception(':error [ :query ]',
175 				array(':error' => mysqli_error($this->_connection), ':query' => $sql),
176 				mysqli_errno($this->_connection));
177 		}
178 
179 		if (isset($benchmark))
  1. MODPATH/database/classes/Kohana/Database/Query.php [ 251 ] » Database_MySQLi->query(arguments)

  2. APPPATH/classes/Model/Category.php [ 387 ] » Kohana_Database_Query->execute()

  3. APPPATH/classes/Filter.php [ 39 ] » Model_Category->getBrandsFromCategories(arguments)

  4. APPPATH/classes/Filter.php [ 7 ] » Filter::generate_filter()

  5. APPPATH/classes/Controller/Catalog.php [ 84 ] » Filter::load()

  6. SYSPATH/classes/Kohana/Controller.php [ 84 ] » Controller_Catalog->action_index()

  7. {PHP internal call} » Kohana_Controller->execute()

  8. SYSPATH/classes/Kohana/Request/Client/Internal.php [ 97 ] » ReflectionMethod->invoke(arguments)

  9. SYSPATH/classes/Kohana/Request/Client.php [ 114 ] » Kohana_Request_Client_Internal->execute_request(arguments)

  10. SYSPATH/classes/Kohana/Request.php [ 997 ] » Kohana_Request_Client->execute(arguments)

  11. DOCROOT/index.php [ 118 ] » Kohana_Request->execute()

Environment