Error: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'Post.link' in 'where clause'
SQL Query: SELECT `Post`.`id`, `Post`.`name`, `Post`.`code`, `Post`.`alias`, `Post`.`cat_id`, `Post`.`price`, `Post`.`type`, `Post`.`shortdes`, `Post`.`content`, `Post`.`images`, `Post`.`images_multi`, `Post`.`pos`, `Post`.`new`, `Post`.`hot`, `Post`.`saleoff`, `Post`.`title_seo`, `Post`.`meta_key`, `Post`.`meta_des`, `Post`.`created`, `Post`.`modified`, `Post`.`status`, `Post`.`view`, `Post`.`slug`, `Post`.`name_eng`, `Post`.`shortdes_eng`, `Post`.`content_eng`, `Post`.`phut`, `Post`.`shortdes_tq`, `Post`.`content_tq`, `Post`.`name_tq`, `Post`.`nguoilon`, `Post`.`treem`, `Post`.`truso`, `Post`.`don`, `Post`.`doi`, `Post`.`lon`, `Post`.`tour`, `Post`.`tourtrongnuoc`, `Post`.`tournuocngoai`, `Post`.`noiden`, `Post`.`ngaydi`, `Post`.`thangdi`, `Post`.`namdi`, `Post`.`ngaykhoihanh`, `Post`.`thoigiandi`, `Post`.`ngaykhoihanh_eng`, `Post`.`thoigiandi_eng`, `Post`.`videoyou`, `Post`.`nt`, `Post`.`duration`, `Post`.`duration_eng`, `Post`.`twodaypro`, `Post`.`twodaypro_eng`, `Post`.`threedaypro`, `Post`.`threedaypro_eng`, `Post`.`photo`, `Post`.`lft`, `Post`.`rght`, `Post`.`vat`, `Post`.`hangsx`, `Post`.`baohanh`, `Post`.`tinhtrang`, `Post`.`tailieu` FROM `nhmay5xa_mi`.`posts` AS `Post` WHERE `Post`.`link` = 'goc-van-hoa' LIMIT 1
Notice: If you want to customize this error message, create app/View/Errors/pdo_error.ctp
try {
$query = $this->_connection->prepare($sql, $prepareOptions);
$query->setFetchMode(PDO::FETCH_LAZY);
if (!$query->execute($params)) {
$this->_results = $query;
array()
$options += array('log' => $this->fullDebug);
$t = microtime(true);
$this->_result = $this->_execute($sql, $params);
'SELECT `Post`.`id`, `Post`.`name`, `Post`.`code`, `Post`.`alias`, `Post`.`cat_id`, `Post`.`price`, `Post`.`type`, `Post`.`shortdes`, `Post`.`content`, `Post`.`images`, `Post`.`images_multi`, `Post`.`pos`, `Post`.`new`, `Post`.`hot`, `Post`.`saleoff`, `Post`.`title_seo`, `Post`.`meta_key`, `Post`.`meta_des`, `Post`.`created`, `Post`.`modified`, `Post`.`status`, `Post`.`view`, `Post`.`slug`, `Post`.`name_eng`, `Post`.`shortdes_eng`, `Post`.`content_eng`, `Post`.`phut`, `Post`.`shortdes_tq`, `Post`.`content_tq`, `Post`.`name_tq`, `Post`.`nguoilon`, `Post`.`treem`, `Post`.`truso`, `Post`.`don`, `Post`.`doi`, `Post`.`lon`, `Post`.`tour`, `Post`.`tourtrongnuoc`, `Post`.`tournuocngoai`, `Post`.`noiden`, `Post`.`ngaydi`, `Post`.`thangdi`, `Post`.`namdi`, `Post`.`ngaykhoihanh`, `Post`.`thoigiandi`, `Post`.`ngaykhoihanh_eng`, `Post`.`thoigiandi_eng`, `Post`.`videoyou`, `Post`.`nt`, `Post`.`duration`, `Post`.`duration_eng`, `Post`.`twodaypro`, `Post`.`twodaypro_eng`, `Post`.`threedaypro`, `Post`.`threedaypro_eng`, `Post`.`photo`, `Post`.`lft`, `Post`.`rght`, `Post`.`vat`, `Post`.`hangsx`, `Post`.`baohanh`, `Post`.`tinhtrang`, `Post`.`tailieu` FROM `nhmay5xa_mi`.`posts` AS `Post` WHERE `Post`.`link` = 'goc-van-hoa' LIMIT 1' array()
if ($cache && ($cached = $this->getQueryCache($sql, $params)) !== false) {
return $cached;
}
if ($result = $this->execute($sql, array(), $params)) {
$out = array();
'SELECT `Post`.`id`, `Post`.`name`, `Post`.`code`, `Post`.`alias`, `Post`.`cat_id`, `Post`.`price`, `Post`.`type`, `Post`.`shortdes`, `Post`.`content`, `Post`.`images`, `Post`.`images_multi`, `Post`.`pos`, `Post`.`new`, `Post`.`hot`, `Post`.`saleoff`, `Post`.`title_seo`, `Post`.`meta_key`, `Post`.`meta_des`, `Post`.`created`, `Post`.`modified`, `Post`.`status`, `Post`.`view`, `Post`.`slug`, `Post`.`name_eng`, `Post`.`shortdes_eng`, `Post`.`content_eng`, `Post`.`phut`, `Post`.`shortdes_tq`, `Post`.`content_tq`, `Post`.`name_tq`, `Post`.`nguoilon`, `Post`.`treem`, `Post`.`truso`, `Post`.`don`, `Post`.`doi`, `Post`.`lon`, `Post`.`tour`, `Post`.`tourtrongnuoc`, `Post`.`tournuocngoai`, `Post`.`noiden`, `Post`.`ngaydi`, `Post`.`thangdi`, `Post`.`namdi`, `Post`.`ngaykhoihanh`, `Post`.`thoigiandi`, `Post`.`ngaykhoihanh_eng`, `Post`.`thoigiandi_eng`, `Post`.`videoyou`, `Post`.`nt`, `Post`.`duration`, `Post`.`duration_eng`, `Post`.`twodaypro`, `Post`.`twodaypro_eng`, `Post`.`threedaypro`, `Post`.`threedaypro_eng`, `Post`.`photo`, `Post`.`lft`, `Post`.`rght`, `Post`.`vat`, `Post`.`hangsx`, `Post`.`baohanh`, `Post`.`tinhtrang`, `Post`.`tailieu` FROM `nhmay5xa_mi`.`posts` AS `Post` WHERE `Post`.`link` = 'goc-van-hoa' LIMIT 1' array() array()
$query = trim($this->generateAssociationQuery($model, null, null, null, null, $queryData, false, $null));
$resultSet = $this->fetchAll($query, $model->cacheQueries);
'SELECT `Post`.`id`, `Post`.`name`, `Post`.`code`, `Post`.`alias`, `Post`.`cat_id`, `Post`.`price`, `Post`.`type`, `Post`.`shortdes`, `Post`.`content`, `Post`.`images`, `Post`.`images_multi`, `Post`.`pos`, `Post`.`new`, `Post`.`hot`, `Post`.`saleoff`, `Post`.`title_seo`, `Post`.`meta_key`, `Post`.`meta_des`, `Post`.`created`, `Post`.`modified`, `Post`.`status`, `Post`.`view`, `Post`.`slug`, `Post`.`name_eng`, `Post`.`shortdes_eng`, `Post`.`content_eng`, `Post`.`phut`, `Post`.`shortdes_tq`, `Post`.`content_tq`, `Post`.`name_tq`, `Post`.`nguoilon`, `Post`.`treem`, `Post`.`truso`, `Post`.`don`, `Post`.`doi`, `Post`.`lon`, `Post`.`tour`, `Post`.`tourtrongnuoc`, `Post`.`tournuocngoai`, `Post`.`noiden`, `Post`.`ngaydi`, `Post`.`thangdi`, `Post`.`namdi`, `Post`.`ngaykhoihanh`, `Post`.`thoigiandi`, `Post`.`ngaykhoihanh_eng`, `Post`.`thoigiandi_eng`, `Post`.`videoyou`, `Post`.`nt`, `Post`.`duration`, `Post`.`duration_eng`, `Post`.`twodaypro`, `Post`.`twodaypro_eng`, `Post`.`threedaypro`, `Post`.`threedaypro_eng`, `Post`.`photo`, `Post`.`lft`, `Post`.`rght`, `Post`.`vat`, `Post`.`hangsx`, `Post`.`baohanh`, `Post`.`tinhtrang`, `Post`.`tailieu` FROM `nhmay5xa_mi`.`posts` AS `Post` WHERE `Post`.`link` = 'goc-van-hoa' LIMIT 1' false
return null;
}
$results = $this->getDataSource()->read($this, $query);
$this->resetAssociations();
object(AppModel) { useDbConfig => 'default' useTable => 'posts' id => false data => array([maximum depth reached]) schemaName => 'nhmay5xa_mi' table => 'posts' primaryKey => 'id' validate => array([maximum depth reached]) validationErrors => array([maximum depth reached]) validationDomain => null name => 'Post' alias => 'Post' tableToModel => array( [maximum depth reached] ) cacheQueries => false belongsTo => array([maximum depth reached]) hasOne => array([maximum depth reached]) hasMany => array([maximum depth reached]) hasAndBelongsToMany => array([maximum depth reached]) actsAs => null Behaviors => object(BehaviorCollection) {} whitelist => array([maximum depth reached]) cacheSources => true findQueryType => null recursive => (int) 1 order => null virtualFields => array([maximum depth reached]) __backAssociation => array([maximum depth reached]) __backInnerAssociation => array([maximum depth reached]) __backOriginalAssociation => array([maximum depth reached]) __backContainableAssociation => array([maximum depth reached]) findMethods => array( [maximum depth reached] ) tablePrefix => '' } array( 'conditions' => array( 'Post.link' => 'goc-van-hoa' ), 'fields' => null, 'joins' => array(), 'limit' => (int) 1, 'offset' => null, 'order' => array( (int) 0 => null ), 'page' => (int) 1, 'group' => null, 'callbacks' => true, 'recursive' => null )
if (isset($params[3 + $off])) {
$recursive = $params[3 + $off];
}
return $args[2]->find('first', compact('conditions', 'fields', 'order', 'recursive'));
}
'first' array( 'conditions' => array( 'Post.link' => 'goc-van-hoa' ), 'fields' => null, 'order' => null, 'recursive' => null )
if ($result !== array('unhandled')) {
return $result;
}
$return = $this->getDataSource()->query($method, $params, $this);
return $return;
'findByLink' array( (int) 0 => 'goc-van-hoa' ) object(AppModel) { useDbConfig => 'default' useTable => 'posts' id => false data => array([maximum depth reached]) schemaName => 'nhmay5xa_mi' table => 'posts' primaryKey => 'id' validate => array([maximum depth reached]) validationErrors => array([maximum depth reached]) validationDomain => null name => 'Post' alias => 'Post' tableToModel => array( [maximum depth reached] ) cacheQueries => false belongsTo => array([maximum depth reached]) hasOne => array([maximum depth reached]) hasMany => array([maximum depth reached]) hasAndBelongsToMany => array([maximum depth reached]) actsAs => null Behaviors => object(BehaviorCollection) {} whitelist => array([maximum depth reached]) cacheSources => true findQueryType => null recursive => (int) 1 order => null virtualFields => array([maximum depth reached]) __backAssociation => array([maximum depth reached]) __backInnerAssociation => array([maximum depth reached]) __backOriginalAssociation => array([maximum depth reached]) __backContainableAssociation => array([maximum depth reached]) findMethods => array( [maximum depth reached] ) tablePrefix => '' }
public function chitiet($id = null) {
$detailNews = $this->Post->findBySlug($id);
if(!$detailNews) $detailNews = $this->Post->findByLink($id);
if(!$detailNews){
'findByLink' array( (int) 0 => 'goc-van-hoa' )
public function chitiet($id = null) {
$detailNews = $this->Post->findBySlug($id);
if(!$detailNews) $detailNews = $this->Post->findByLink($id);
if(!$detailNews){
'goc-van-hoa'
'goc-van-hoa'
'action' => $request->params['action']
));
}
return $method->invokeArgs($this, $request->params['pass']);
object(ProductController) { name => 'Product' uses => array( [maximum depth reached] ) helpers => array( [maximum depth reached] ) components => array( [maximum depth reached] ) request => object(CakeRequest) {} response => object(CakeResponse) {} viewPath => 'Product' layoutPath => null viewVars => array( [maximum depth reached] ) view => 'chitiet' layout => 'home' autoRender => true autoLayout => true Components => object(ComponentCollection) {} viewClass => 'View' View => null ext => '.ctp' plugin => null cacheAction => false passedArgs => array( [maximum depth reached] ) scaffold => false methods => array( [maximum depth reached] ) modelClass => 'Catproduct' modelKey => 'product' validationErrors => null Session => object(SessionComponent) {} Email => object(EmailComponent) {} Setting => object(AppModel) {} Slideshow => object(AppModel) {} Support => object(AppModel) {} Catproduct => object(Catproduct) {} Hang => object(AppModel) {} Product => object(Product) {} Post => object(AppModel) {} Advertisement => object(AppModel) {} } array( (int) 0 => 'goc-van-hoa' )
$controller->startupProcess();
$render = true;
$result = $controller->invokeAction($request);
if ($result instanceof CakeResponse) {
object(CakeRequest) { params => array( [maximum depth reached] ) data => array([maximum depth reached]) query => array([maximum depth reached]) url => '/goc-van-hoa.htm' base => '' webroot => '/' here => '//goc-van-hoa.htm' }
));
}
$response = $this->_invoke($controller, $request, $response);
if (isset($request->params['return'])) {
object(ProductController) { name => 'Product' uses => array( [maximum depth reached] ) helpers => array( [maximum depth reached] ) components => array( [maximum depth reached] ) request => object(CakeRequest) {} response => object(CakeResponse) {} viewPath => 'Product' layoutPath => null viewVars => array( [maximum depth reached] ) view => 'chitiet' layout => 'home' autoRender => true autoLayout => true Components => object(ComponentCollection) {} viewClass => 'View' View => null ext => '.ctp' plugin => null cacheAction => false passedArgs => array( [maximum depth reached] ) scaffold => false methods => array( [maximum depth reached] ) modelClass => 'Catproduct' modelKey => 'product' validationErrors => null Session => object(SessionComponent) {} Email => object(EmailComponent) {} Setting => object(AppModel) {} Slideshow => object(AppModel) {} Support => object(AppModel) {} Catproduct => object(Catproduct) {} Hang => object(AppModel) {} Product => object(Product) {} Post => object(AppModel) {} Advertisement => object(AppModel) {} } object(CakeRequest) { params => array( [maximum depth reached] ) data => array([maximum depth reached]) query => array([maximum depth reached]) url => '/goc-van-hoa.htm' base => '' webroot => '/' here => '//goc-van-hoa.htm' } object(CakeResponse) { }
App::uses('Dispatcher', 'Routing');
$Dispatcher = new Dispatcher();
$Dispatcher->dispatch(new CakeRequest(), new CakeResponse(array('charset' => Configure::read('App.encoding'))));
object(CakeRequest) { params => array( [maximum depth reached] ) data => array([maximum depth reached]) query => array([maximum depth reached]) url => '/goc-van-hoa.htm' base => '' webroot => '/' here => '//goc-van-hoa.htm' } object(CakeResponse) { }