Database Error
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`, `Post`.`tag`, `Catproduct`.`id`, `Catproduct`.`name`, `Catproduct`.`parent_id`, `Catproduct`.`alias`, `Catproduct`.`images`, `Catproduct`.`lft`, `Catproduct`.`rght`, `Catproduct`.`pos`, `Catproduct`.`status`, `Catproduct`.`title_seo`, `Catproduct`.`meta_key`, `Catproduct`.`meta_des`, `Catproduct`.`created`, `Catproduct`.`modified`, `Catproduct`.`slug`, `Catproduct`.`cate`, `Catproduct`.`link`, `Catproduct`.`name_eng`, `Catproduct`.`name_tq`, `Catproduct`.`type`, `Catproduct`.`hot`, `Catproduct`.`content`, `Catproduct`.`display`, `Catproduct`.`content_eng` FROM `tracdiathanhda_t`.`posts` AS `Post` LEFT JOIN `tracdiathanhda_t`.`catproducts` AS `Catproduct` ON (`Post`.`cat_id` = `Catproduct`.`id`) WHERE `Post`.`link` = 'nhung-loi-thuong-gap-khi-su-dung-may-toan-dac-dien-tu' LIMIT 1
Notice:
If you want to customize this error message, create app/View/Errors/pdo_error.ctp
Stack Trace
- CORE/Cake/Model/Datasource/DboSource.php line 461 → PDOStatement->execute(array)
try {
$query = $this->_connection->prepare($sql, $prepareOptions);
$query->setFetchMode(PDO::FETCH_LAZY);
if (!$query->execute($params)) {
$this->_results = $query;
- CORE/Cake/Model/Datasource/DboSource.php line 427 → DboSource->_execute(string, 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`, `Post`.`tag`, `Catproduct`.`id`, `Catproduct`.`name`, `Catproduct`.`parent_id`, `Catproduct`.`alias`, `Catproduct`.`images`, `Catproduct`.`lft`, `Catproduct`.`rght`, `Catproduct`.`pos`, `Catproduct`.`status`, `Catproduct`.`title_seo`, `Catproduct`.`meta_key`, `Catproduct`.`meta_des`, `Catproduct`.`created`, `Catproduct`.`modified`, `Catproduct`.`slug`, `Catproduct`.`cate`, `Catproduct`.`link`, `Catproduct`.`name_eng`, `Catproduct`.`name_tq`, `Catproduct`.`type`, `Catproduct`.`hot`, `Catproduct`.`content`, `Catproduct`.`display`, `Catproduct`.`content_eng` FROM `tracdiathanhda_t`.`posts` AS `Post` LEFT JOIN `tracdiathanhda_t`.`catproducts` AS `Catproduct` ON (`Post`.`cat_id` = `Catproduct`.`id`) WHERE `Post`.`link` = 'nhung-loi-thuong-gap-khi-su-dung-may-toan-dac-dien-tu' LIMIT 1'
array()
- CORE/Cake/Model/Datasource/DboSource.php line 671 → DboSource->execute(string, array, 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`, `Post`.`tag`, `Catproduct`.`id`, `Catproduct`.`name`, `Catproduct`.`parent_id`, `Catproduct`.`alias`, `Catproduct`.`images`, `Catproduct`.`lft`, `Catproduct`.`rght`, `Catproduct`.`pos`, `Catproduct`.`status`, `Catproduct`.`title_seo`, `Catproduct`.`meta_key`, `Catproduct`.`meta_des`, `Catproduct`.`created`, `Catproduct`.`modified`, `Catproduct`.`slug`, `Catproduct`.`cate`, `Catproduct`.`link`, `Catproduct`.`name_eng`, `Catproduct`.`name_tq`, `Catproduct`.`type`, `Catproduct`.`hot`, `Catproduct`.`content`, `Catproduct`.`display`, `Catproduct`.`content_eng` FROM `tracdiathanhda_t`.`posts` AS `Post` LEFT JOIN `tracdiathanhda_t`.`catproducts` AS `Catproduct` ON (`Post`.`cat_id` = `Catproduct`.`id`) WHERE `Post`.`link` = 'nhung-loi-thuong-gap-khi-su-dung-may-toan-dac-dien-tu' LIMIT 1'
array()
array()
- CORE/Cake/Model/Datasource/DboSource.php line 1082 → DboSource->fetchAll(string, boolean)
$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`, `Post`.`tag`, `Catproduct`.`id`, `Catproduct`.`name`, `Catproduct`.`parent_id`, `Catproduct`.`alias`, `Catproduct`.`images`, `Catproduct`.`lft`, `Catproduct`.`rght`, `Catproduct`.`pos`, `Catproduct`.`status`, `Catproduct`.`title_seo`, `Catproduct`.`meta_key`, `Catproduct`.`meta_des`, `Catproduct`.`created`, `Catproduct`.`modified`, `Catproduct`.`slug`, `Catproduct`.`cate`, `Catproduct`.`link`, `Catproduct`.`name_eng`, `Catproduct`.`name_tq`, `Catproduct`.`type`, `Catproduct`.`hot`, `Catproduct`.`content`, `Catproduct`.`display`, `Catproduct`.`content_eng` FROM `tracdiathanhda_t`.`posts` AS `Post` LEFT JOIN `tracdiathanhda_t`.`catproducts` AS `Catproduct` ON (`Post`.`cat_id` = `Catproduct`.`id`) WHERE `Post`.`link` = 'nhung-loi-thuong-gap-khi-su-dung-may-toan-dac-dien-tu' LIMIT 1'
false
- CORE/Cake/Model/Model.php line 2630 → DboSource->read(Post, array)
return null;
}
$results = $this->getDataSource()->read($this, $query);
$this->resetAssociations();
object(Post) {
name => 'Post'
displayField => 'name'
belongsTo => array(
[maximum depth reached]
)
useDbConfig => 'default'
useTable => 'posts'
id => false
data => array([maximum depth reached])
schemaName => 'tracdiathanhda_t'
table => 'posts'
primaryKey => 'id'
validate => array([maximum depth reached])
validationErrors => array([maximum depth reached])
validationDomain => null
alias => 'Post'
tableToModel => array(
[maximum depth reached]
)
cacheQueries => false
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 => ''
Catproduct => object(Catproduct) {}
}
array(
'conditions' => array(
'Post.link' => 'nhung-loi-thuong-gap-khi-su-dung-may-toan-dac-dien-tu'
),
'fields' => null,
'joins' => array(),
'limit' => (int) 1,
'offset' => null,
'order' => array(
(int) 0 => null
),
'page' => (int) 1,
'group' => null,
'callbacks' => true,
'recursive' => null
)
- CORE/Cake/Model/Datasource/DboSource.php line 600 → Model->find(string, array)
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' => 'nhung-loi-thuong-gap-khi-su-dung-may-toan-dac-dien-tu'
),
'fields' => null,
'order' => null,
'recursive' => null
)
- CORE/Cake/Model/Model.php line 784 → DboSource->query(string, array, Post)
if ($result !== array('unhandled')) {
return $result;
}
$return = $this->getDataSource()->query($method, $params, $this);
return $return;
'findByLink'
array(
(int) 0 => 'nhung-loi-thuong-gap-khi-su-dung-may-toan-dac-dien-tu'
)
object(Post) {
name => 'Post'
displayField => 'name'
belongsTo => array(
[maximum depth reached]
)
useDbConfig => 'default'
useTable => 'posts'
id => false
data => array([maximum depth reached])
schemaName => 'tracdiathanhda_t'
table => 'posts'
primaryKey => 'id'
validate => array([maximum depth reached])
validationErrors => array([maximum depth reached])
validationDomain => null
alias => 'Post'
tableToModel => array(
[maximum depth reached]
)
cacheQueries => false
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 => ''
Catproduct => object(Catproduct) {}
}
- APP/Controller/ProductController.php line 75 → Model->__call(string, array)
public function chitiet($id = null) {
$detailNews = $this->Post->findBySlug($id);
if(!$detailNews) $detailNews = $this->Post->findByLink($id);
if(!$detailNews){
'findByLink'
array(
(int) 0 => 'nhung-loi-thuong-gap-khi-su-dung-may-toan-dac-dien-tu'
)
- APP/Controller/ProductController.php line 75 → Post->findByLink(string)
public function chitiet($id = null) {
$detailNews = $this->Post->findBySlug($id);
if(!$detailNews) $detailNews = $this->Post->findByLink($id);
if(!$detailNews){
'nhung-loi-thuong-gap-khi-su-dung-may-toan-dac-dien-tu'
- [internal function] → ProductController->chitiet(string)
'nhung-loi-thuong-gap-khi-su-dung-may-toan-dac-dien-tu'
- CORE/Cake/Controller/Controller.php line 485 → ReflectionMethod->invokeArgs(ProductController, array)
'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) {}
Catproduct => object(Catproduct) {}
Advertisement => object(AppModel) {}
Product => object(Product) {}
Post => object(Post) {}
Slideshow => object(AppModel) {}
Support => object(AppModel) {}
Setting => object(AppModel) {}
}
array(
(int) 0 => 'nhung-loi-thuong-gap-khi-su-dung-may-toan-dac-dien-tu'
)
- CORE/Cake/Routing/Dispatcher.php line 186 → Controller->invokeAction(CakeRequest)
$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 => 'Product/chitiet/nhung-loi-thuong-gap-khi-su-dung-may-toan-dac-dien-tu/page:12'
base => ''
webroot => '/'
here => '/Product/chitiet/nhung-loi-thuong-gap-khi-su-dung-may-toan-dac-dien-tu/page:12'
}
- CORE/Cake/Routing/Dispatcher.php line 161 → Dispatcher->_invoke(ProductController, CakeRequest, CakeResponse)
));
}
$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) {}
Catproduct => object(Catproduct) {}
Advertisement => object(AppModel) {}
Product => object(Product) {}
Post => object(Post) {}
Slideshow => object(AppModel) {}
Support => object(AppModel) {}
Setting => object(AppModel) {}
}
object(CakeRequest) {
params => array(
[maximum depth reached]
)
data => array([maximum depth reached])
query => array([maximum depth reached])
url => 'Product/chitiet/nhung-loi-thuong-gap-khi-su-dung-may-toan-dac-dien-tu/page:12'
base => ''
webroot => '/'
here => '/Product/chitiet/nhung-loi-thuong-gap-khi-su-dung-may-toan-dac-dien-tu/page:12'
}
object(CakeResponse) {
}
- APP/webroot/index.php line 92 → Dispatcher->dispatch(CakeRequest, 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 => 'Product/chitiet/nhung-loi-thuong-gap-khi-su-dung-may-toan-dac-dien-tu/page:12'
base => ''
webroot => '/'
here => '/Product/chitiet/nhung-loi-thuong-gap-khi-su-dung-may-toan-dac-dien-tu/page:12'
}
object(CakeResponse) {
}