Database Error PDOException

Documentation API

Error: SQLSTATE[42000]: Syntax error or access violation: 1064 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 'ORDER BY Products.id DESC LIMIT 12 OFFSET 0' at line 1

If you are using SQL keywords as table column names, you can enable identifier quoting for your database connection in config/app.php.

SQL Query:

SELECT `Products`.`id` AS `Products__id`, `Products`.`catalog_name` AS `Products__catalog_name`, `Products`.`slug` AS `Products__slug`, `Products`.`brand_id` AS `Products__brand_id`, `Products`.`category_id` AS `Products__category_id`, `Products`.`average_price` AS `Products__average_price`, `Products`.`price` AS `Products__price`, `Products`.`stock` AS `Products__stock`, `Products`.`fabric` AS `Products__fabric`, `Products`.`featured_image` AS `Products__featured_image`, `Products`.`page_des1` AS `Products__page_des1`, `Products`.`page_desc2` AS `Products__page_desc2`, `Products`.`seo_title` AS `Products__seo_title`, `Products`.`seo_desc` AS `Products__seo_desc`, `Products`.`seo_keyword` AS `Products__seo_keyword`, `Products`.`status` AS `Products__status`, `Products`.`subcate` AS `Products__subcate`, `Products`.`created_data` AS `Products__created_data`, `Products`.`views` AS `Products__views`, `Products`.`updated_date` AS `Products__updated_date`, `Brands`.`id` AS `Brands__id`, `Brands`.`brand_name` AS `Brands__brand_name` FROM `products` `Products` INNER JOIN `brands` `Brands` ON `Brands`.`id` = (`Products`.`brand_id`) WHERE Products.category_id =  ORDER BY Products.id DESC LIMIT 12 OFFSET 0

If you want to customize this error message, create src/Template/Error/pdo_error.ctp

toggle vendor stack frames