Notice (8): Undefined index: offset [APP/controllers/products_controller.php, line 43]
Code 'Product.category_id'=>$this->passedArgs['category']
),
'limit'=> $this->passedArgs['offset'].',1'
ProductsController::getProductByCategoryId() - APP/controllers/products_controller.php, line 43
Object::dispatchMethod() - CORE/cake/libs/object.php, line 116
Dispatcher::_invoke() - CORE/cake/dispatcher.php, line 227
Dispatcher::dispatch() - CORE/cake/dispatcher.php, line 194
[main] - CORE/webroot/index.php, line 92
Warning (512): SQL Error: 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 '1' at line 1 [CORE/cake/libs/model/datasources/dbo_source.php, line 525]
Code |
Context$sql = "SELECT `Product`.`id`, `Product`.`category_id`, `Product`.`brand_id`, `Product`.`created`, `Product`.`modified`, `Product`.`priority`, `Product`.`active`, `Product`.`featured`, `Product`.`is_new`, `Product`.`name`, `Product`.`article_num`, `Product`.`title_bg`, `Product`.`annotation_bg`, `Product`.`content_bg`, `Product`.`title_en`, `Product`.`annotation_en`, `Product`.`content_en`, `Product`.`recommend_1`, `Product`.`recommend_2`, `Product`.`recommend_3`, `ProductCategory`.`id`, `ProductCategory`.`parent_id`, `ProductCategory`.`created`, `ProductCategory`.`modified`, `ProductCategory`.`lft`, `ProductCategory`.`rght`, `ProductCategory`.`active`, `ProductCategory`.`name`, `ProductCategory`.`title_bg`, `ProductCategory`.`annotation_bg`, `ProductCategory`.`title_en`, `ProductCategory`.`annotation_en`, `Seo`.`id`, `Seo`.`class`, `Seo`.`foreign_id`, `Seo`.`created`, `Seo`.`modified`, `Seo`.`title_bg`, `Seo`.`content_bg`, `Seo`.`keywords_bg`, `Seo`.`description_bg`, `Seo`.`subject_bg`, `Seo`.`comment_bg`, `Seo`.`alt_1_bg`, `Seo`.`alt_2_bg`, `Seo`.`alt_3_bg`, `Seo`.`title_en`, `Seo`.`content_en`, `Seo`.`keywords_en`, `Seo`.`description_en`, `Seo`.`subject_en`, `Seo`.`comment_en`, `Seo`.`alt_1_en`, `Seo`.`alt_2_en`, `Seo`.`alt_3_en` FROM `products` AS `Product` LEFT JOIN `product_categories` AS `ProductCategory` ON (`Product`.`category_id` = `ProductCategory`.`id`) LEFT JOIN `seos` AS `Seo` ON (`Seo`.`foreign_id` = `Product`.`id` AND `Seo`.`class` = 'Product') WHERE `Product`.`id` <> 966 AND `Product`.`category_id` = 19 AND `Product`.`active` = 1 ORDER BY `Product`.`category_id` asc, `Product`.`priority` asc LIMIT ,1"
$error = "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 '1' at line 1"
$out = null
$out = null;
if ($error) {
trigger_error("<span style = \"color:Red;text-align:left\"><b>SQL Error:</b> {$this->error}</span>", E_USER_WARNING);
DboSource::showQuery() - CORE/cake/libs/model/datasources/dbo_source.php, line 525
DboSource::execute() - CORE/cake/libs/model/datasources/dbo_source.php, line 201
DboSource::fetchAll() - CORE/cake/libs/model/datasources/dbo_source.php, line 336
DboSource::read() - CORE/cake/libs/model/datasources/dbo_source.php, line 653
Model::find() - CORE/cake/libs/model/model.php, line 1992
ProductsController::getProductByCategoryId() - APP/controllers/products_controller.php, line 45
Object::dispatchMethod() - CORE/cake/libs/object.php, line 116
Dispatcher::_invoke() - CORE/cake/dispatcher.php, line 227
Dispatcher::dispatch() - CORE/cake/dispatcher.php, line 194
[main] - CORE/webroot/index.php, line 92
Query: SELECT `Product`.`id`, `Product`.`category_id`, `Product`.`brand_id`, `Product`.`created`, `Product`.`modified`, `Product`.`priority`, `Product`.`active`, `Product`.`featured`, `Product`.`is_new`, `Product`.`name`, `Product`.`article_num`, `Product`.`title_bg`, `Product`.`annotation_bg`, `Product`.`content_bg`, `Product`.`title_en`, `Product`.`annotation_en`, `Product`.`content_en`, `Product`.`recommend_1`, `Product`.`recommend_2`, `Product`.`recommend_3`, `ProductCategory`.`id`, `ProductCategory`.`parent_id`, `ProductCategory`.`created`, `ProductCategory`.`modified`, `ProductCategory`.`lft`, `ProductCategory`.`rght`, `ProductCategory`.`active`, `ProductCategory`.`name`, `ProductCategory`.`title_bg`, `ProductCategory`.`annotation_bg`, `ProductCategory`.`title_en`, `ProductCategory`.`annotation_en`, `Seo`.`id`, `Seo`.`class`, `Seo`.`foreign_id`, `Seo`.`created`, `Seo`.`modified`, `Seo`.`title_bg`, `Seo`.`content_bg`, `Seo`.`keywords_bg`, `Seo`.`description_bg`, `Seo`.`subject_bg`, `Seo`.`comment_bg`, `Seo`.`alt_1_bg`, `Seo`.`alt_2_bg`, `Seo`.`alt_3_bg`, `Seo`.`title_en`, `Seo`.`content_en`, `Seo`.`keywords_en`, `Seo`.`description_en`, `Seo`.`subject_en`, `Seo`.`comment_en`, `Seo`.`alt_1_en`, `Seo`.`alt_2_en`, `Seo`.`alt_3_en` FROM `products` AS `Product` LEFT JOIN `product_categories` AS `ProductCategory` ON (`Product`.`category_id` = `ProductCategory`.`id`) LEFT JOIN `seos` AS `Seo` ON (`Seo`.`foreign_id` = `Product`.`id` AND `Seo`.`class` = 'Product') WHERE `Product`.`id` <> 966 AND `Product`.`category_id` = 19 AND `Product`.`active` = 1 ORDER BY `Product`.`category_id` asc, `Product`.`priority` asc LIMIT ,1