$sql = "SELECT COUNT(*) AS `count` FROM `news` AS `News` LEFT JOIN `newscategories` AS `Newscategory` ON (`News`.`newscategory_id` = `Newscategory`.`id`) WHERE `category_id` = 'link.html' AND ((((((`News`.`date_on` <= '2012-05-17') AND (`News`.`date_off` > '2012-05-17'))) OR (((`News`.`date_on` <= '2012-05-17') AND (`News`.`date_off` = '0000-00-00'))) OR (((`News`.`date_on` = '0000-00-00') AND (`News`.`date_off` > '2012-05-17'))) OR (((`News`.`date_on` = '0000-00-00') AND (`News`.`date_off` = '0000-00-00'))))) AND (`News`.`active` = 1)) "
$error = "1054: Unknown column 'category_id' in 'where clause'"
$out = null
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 1988
Controller::paginate() - CORE/cake/libs/controller/controller.php, line 1070
NewsController::index() - CORE/mrcontent/controllers/news_controller.php, line 28
Object::dispatchMethod() - CORE/cake/libs/object.php, line 118
Dispatcher::_invoke() - CORE/cake/dispatcher.php, line 227
Dispatcher::dispatch() - CORE/cake/dispatcher.php, line 194
require - APP/webroot/index.php, line 88
[main] - CORE/index.php, line 61
Query: SELECT COUNT(*) AS `count` FROM `news` AS `News` LEFT JOIN `newscategories` AS `Newscategory` ON (`News`.`newscategory_id` = `Newscategory`.`id`) WHERE `category_id` = 'link.html' AND ((((((`News`.`date_on` <= '2012-05-17') AND (`News`.`date_off` > '2012-05-17'))) OR (((`News`.`date_on` <= '2012-05-17') AND (`News`.`date_off` = '0000-00-00'))) OR (((`News`.`date_on` = '0000-00-00') AND (`News`.`date_off` > '2012-05-17'))) OR (((`News`.`date_on` = '0000-00-00') AND (`News`.`date_off` = '0000-00-00'))))) AND (`News`.`active` = 1))
Warning (2): Invalid argument supplied for foreach() [CORE/mrcontent/mrcontent_model.php, line 75]
if($this->isI18n)
{
foreach($results as $key=>$result)
MrcontentModel::afterFind() - CORE/mrcontent/mrcontent_model.php, line 75
Model::__filterResults() - CORE/cake/libs/model/model.php, line 2234
Model::find() - CORE/cake/libs/model/model.php, line 1993
Controller::paginate() - CORE/cake/libs/controller/controller.php, line 1070
NewsController::index() - CORE/mrcontent/controllers/news_controller.php, line 28
Object::dispatchMethod() - CORE/cake/libs/object.php, line 118
Dispatcher::_invoke() - CORE/cake/dispatcher.php, line 227
Dispatcher::dispatch() - CORE/cake/dispatcher.php, line 194
require - APP/webroot/index.php, line 88
[main] - CORE/index.php, line 61
Query: SELECT `News`.`id`, `News`.`newscategory_id`, `News`.`title`, `News`.`summary`, `News`.`text`, `News`.`active`, `News`.`date_on`, `News`.`date_off`, `News`.`slug`, `News`.`created`, `News`.`modified`, `Newscategory`.`id`, `Newscategory`.`parent_id`, `Newscategory`.`lft`, `Newscategory`.`rght`, `Newscategory`.`name`, `Newscategory`.`active`, `Newscategory`.`slug`, `Newscategory`.`created`, `Newscategory`.`modified` FROM `news` AS `News` LEFT JOIN `newscategories` AS `Newscategory` ON (`News`.`newscategory_id` = `Newscategory`.`id`) WHERE `category_id` = 'link.html' AND ((((((`News`.`date_on` <= '2012-05-17') AND (`News`.`date_off` > '2012-05-17'))) OR (((`News`.`date_on` <= '2012-05-17') AND (`News`.`date_off` = '0000-00-00'))) OR (((`News`.`date_on` = '0000-00-00') AND (`News`.`date_off` > '2012-05-17'))) OR (((`News`.`date_on` = '0000-00-00') AND (`News`.`date_off` = '0000-00-00'))))) AND (`News`.`active` = 1)) ORDER BY `News`.`date_on` desc, `News`.`created` desc, `News`.`id` desc LIMIT 5