Database Error
Error:
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'Product.link' in 'where clause'
SQL Query:
SELECT `Product`.`id`, `Product`.`name`, `Product`.`code`, `Product`.`alias`, `Product`.`cat_id`, `Product`.`hang_id`, `Product`.`price`, `Product`.`saleoff`, `Product`.`type`, `Product`.`shortdes`, `Product`.`content`, `Product`.`thongso`, `Product`.`images`, `Product`.`images_multi`, `Product`.`pos`, `Product`.`new`, `Product`.`hot`, `Product`.`title_seo`, `Product`.`meta_key`, `Product`.`meta_des`, `Product`.`created`, `Product`.`modified`, `Product`.`status`, `Product`.`view`, `Product`.`slug`, `Product`.`name_eng`, `Product`.`shortdes_eng`, `Product`.`content_eng`, `Product`.`phut`, `Product`.`shortdes_tq`, `Product`.`content_tq`, `Product`.`name_tq`, `Product`.`nguoilon`, `Product`.`treem`, `Product`.`truso`, `Product`.`don`, `Product`.`doi`, `Product`.`lon`, `Product`.`tour`, `Product`.`tourtrongnuoc`, `Product`.`tournuocngoai`, `Product`.`noiden`, `Product`.`ngaydi`, `Product`.`thangdi`, `Product`.`namdi`, `Product`.`ngaykhoihanh`, `Product`.`thoigiandi`, `Product`.`ngaykhoihanh_eng`, `Product`.`thoigiandi_eng`, `Product`.`videoyou`, `Product`.`nt`, `Product`.`duration`, `Product`.`duration_eng`, `Product`.`twodaypro`, `Product`.`twodaypro_eng`, `Product`.`threedaypro`, `Product`.`threedaypro_eng`, `Product`.`photo`, `Product`.`lft`, `Product`.`rght`, `Product`.`vat`, `Product`.`hangsx`, `Product`.`baohanh`, `Product`.`tinhtrang`, `Product`.`tailieu`, `Product`.`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`.`products` AS `Product` LEFT JOIN `tracdiathanhda_t`.`catproducts` AS `Catproduct` ON (`Product`.`cat_id` = `Catproduct`.`id`) WHERE `Product`.`link` = 'may-toan-dac-dien-tu-leica-tso2-power-7' 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 `Product`.`id`, `Product`.`name`, `Product`.`code`, `Product`.`alias`, `Product`.`cat_id`, `Product`.`hang_id`, `Product`.`price`, `Product`.`saleoff`, `Product`.`type`, `Product`.`shortdes`, `Product`.`content`, `Product`.`thongso`, `Product`.`images`, `Product`.`images_multi`, `Product`.`pos`, `Product`.`new`, `Product`.`hot`, `Product`.`title_seo`, `Product`.`meta_key`, `Product`.`meta_des`, `Product`.`created`, `Product`.`modified`, `Product`.`status`, `Product`.`view`, `Product`.`slug`, `Product`.`name_eng`, `Product`.`shortdes_eng`, `Product`.`content_eng`, `Product`.`phut`, `Product`.`shortdes_tq`, `Product`.`content_tq`, `Product`.`name_tq`, `Product`.`nguoilon`, `Product`.`treem`, `Product`.`truso`, `Product`.`don`, `Product`.`doi`, `Product`.`lon`, `Product`.`tour`, `Product`.`tourtrongnuoc`, `Product`.`tournuocngoai`, `Product`.`noiden`, `Product`.`ngaydi`, `Product`.`thangdi`, `Product`.`namdi`, `Product`.`ngaykhoihanh`, `Product`.`thoigiandi`, `Product`.`ngaykhoihanh_eng`, `Product`.`thoigiandi_eng`, `Product`.`videoyou`, `Product`.`nt`, `Product`.`duration`, `Product`.`duration_eng`, `Product`.`twodaypro`, `Product`.`twodaypro_eng`, `Product`.`threedaypro`, `Product`.`threedaypro_eng`, `Product`.`photo`, `Product`.`lft`, `Product`.`rght`, `Product`.`vat`, `Product`.`hangsx`, `Product`.`baohanh`, `Product`.`tinhtrang`, `Product`.`tailieu`, `Product`.`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`.`products` AS `Product` LEFT JOIN `tracdiathanhda_t`.`catproducts` AS `Catproduct` ON (`Product`.`cat_id` = `Catproduct`.`id`) WHERE `Product`.`link` = 'may-toan-dac-dien-tu-leica-tso2-power-7' 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 `Product`.`id`, `Product`.`name`, `Product`.`code`, `Product`.`alias`, `Product`.`cat_id`, `Product`.`hang_id`, `Product`.`price`, `Product`.`saleoff`, `Product`.`type`, `Product`.`shortdes`, `Product`.`content`, `Product`.`thongso`, `Product`.`images`, `Product`.`images_multi`, `Product`.`pos`, `Product`.`new`, `Product`.`hot`, `Product`.`title_seo`, `Product`.`meta_key`, `Product`.`meta_des`, `Product`.`created`, `Product`.`modified`, `Product`.`status`, `Product`.`view`, `Product`.`slug`, `Product`.`name_eng`, `Product`.`shortdes_eng`, `Product`.`content_eng`, `Product`.`phut`, `Product`.`shortdes_tq`, `Product`.`content_tq`, `Product`.`name_tq`, `Product`.`nguoilon`, `Product`.`treem`, `Product`.`truso`, `Product`.`don`, `Product`.`doi`, `Product`.`lon`, `Product`.`tour`, `Product`.`tourtrongnuoc`, `Product`.`tournuocngoai`, `Product`.`noiden`, `Product`.`ngaydi`, `Product`.`thangdi`, `Product`.`namdi`, `Product`.`ngaykhoihanh`, `Product`.`thoigiandi`, `Product`.`ngaykhoihanh_eng`, `Product`.`thoigiandi_eng`, `Product`.`videoyou`, `Product`.`nt`, `Product`.`duration`, `Product`.`duration_eng`, `Product`.`twodaypro`, `Product`.`twodaypro_eng`, `Product`.`threedaypro`, `Product`.`threedaypro_eng`, `Product`.`photo`, `Product`.`lft`, `Product`.`rght`, `Product`.`vat`, `Product`.`hangsx`, `Product`.`baohanh`, `Product`.`tinhtrang`, `Product`.`tailieu`, `Product`.`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`.`products` AS `Product` LEFT JOIN `tracdiathanhda_t`.`catproducts` AS `Catproduct` ON (`Product`.`cat_id` = `Catproduct`.`id`) WHERE `Product`.`link` = 'may-toan-dac-dien-tu-leica-tso2-power-7' 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 `Product`.`id`, `Product`.`name`, `Product`.`code`, `Product`.`alias`, `Product`.`cat_id`, `Product`.`hang_id`, `Product`.`price`, `Product`.`saleoff`, `Product`.`type`, `Product`.`shortdes`, `Product`.`content`, `Product`.`thongso`, `Product`.`images`, `Product`.`images_multi`, `Product`.`pos`, `Product`.`new`, `Product`.`hot`, `Product`.`title_seo`, `Product`.`meta_key`, `Product`.`meta_des`, `Product`.`created`, `Product`.`modified`, `Product`.`status`, `Product`.`view`, `Product`.`slug`, `Product`.`name_eng`, `Product`.`shortdes_eng`, `Product`.`content_eng`, `Product`.`phut`, `Product`.`shortdes_tq`, `Product`.`content_tq`, `Product`.`name_tq`, `Product`.`nguoilon`, `Product`.`treem`, `Product`.`truso`, `Product`.`don`, `Product`.`doi`, `Product`.`lon`, `Product`.`tour`, `Product`.`tourtrongnuoc`, `Product`.`tournuocngoai`, `Product`.`noiden`, `Product`.`ngaydi`, `Product`.`thangdi`, `Product`.`namdi`, `Product`.`ngaykhoihanh`, `Product`.`thoigiandi`, `Product`.`ngaykhoihanh_eng`, `Product`.`thoigiandi_eng`, `Product`.`videoyou`, `Product`.`nt`, `Product`.`duration`, `Product`.`duration_eng`, `Product`.`twodaypro`, `Product`.`twodaypro_eng`, `Product`.`threedaypro`, `Product`.`threedaypro_eng`, `Product`.`photo`, `Product`.`lft`, `Product`.`rght`, `Product`.`vat`, `Product`.`hangsx`, `Product`.`baohanh`, `Product`.`tinhtrang`, `Product`.`tailieu`, `Product`.`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`.`products` AS `Product` LEFT JOIN `tracdiathanhda_t`.`catproducts` AS `Catproduct` ON (`Product`.`cat_id` = `Catproduct`.`id`) WHERE `Product`.`link` = 'may-toan-dac-dien-tu-leica-tso2-power-7' LIMIT 1'
false
- CORE/Cake/Model/Model.php line 2630 → DboSource->read(Product, array)
return null;
}
$results = $this->getDataSource()->read($this, $query);
$this->resetAssociations();
object(Product) {
name => 'Product'
displayField => 'name'
actsAs => array([maximum depth reached])
belongsTo => array(
[maximum depth reached]
)
useDbConfig => 'default'
useTable => 'products'
id => false
data => array([maximum depth reached])
schemaName => 'tracdiathanhda_t'
table => 'products'
primaryKey => 'id'
validate => array([maximum depth reached])
validationErrors => array([maximum depth reached])
validationDomain => null
alias => 'Product'
tableToModel => array(
[maximum depth reached]
)
cacheQueries => false
hasOne => array([maximum depth reached])
hasMany => array([maximum depth reached])
hasAndBelongsToMany => array([maximum depth reached])
Behaviors => object(BehaviorCollection) {}
whitelist => array([maximum depth reached])
cacheSources => true
findQueryType => 'first'
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(
'Product.link' => 'may-toan-dac-dien-tu-leica-tso2-power-7'
),
'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(
'Product.link' => 'may-toan-dac-dien-tu-leica-tso2-power-7'
),
'fields' => null,
'order' => null,
'recursive' => null
)
- CORE/Cake/Model/Model.php line 784 → DboSource->query(string, array, Product)
if ($result !== array('unhandled')) {
return $result;
}
$return = $this->getDataSource()->query($method, $params, $this);
return $return;
'findByLink'
array(
(int) 0 => 'may-toan-dac-dien-tu-leica-tso2-power-7'
)
object(Product) {
name => 'Product'
displayField => 'name'
actsAs => array([maximum depth reached])
belongsTo => array(
[maximum depth reached]
)
useDbConfig => 'default'
useTable => 'products'
id => false
data => array([maximum depth reached])
schemaName => 'tracdiathanhda_t'
table => 'products'
primaryKey => 'id'
validate => array([maximum depth reached])
validationErrors => array([maximum depth reached])
validationDomain => null
alias => 'Product'
tableToModel => array(
[maximum depth reached]
)
cacheQueries => false
hasOne => array([maximum depth reached])
hasMany => array([maximum depth reached])
hasAndBelongsToMany => array([maximum depth reached])
Behaviors => object(BehaviorCollection) {}
whitelist => array([maximum depth reached])
cacheSources => true
findQueryType => 'first'
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 34 → Model->__call(string, array)
public function chitietsanpham($id = null) {
$detailNews = $this->Product->findBySlug($id);
if(!$detailNews) $detailNews = $this->Product->findByLink($id);
if(!$detailNews){
'findByLink'
array(
(int) 0 => 'may-toan-dac-dien-tu-leica-tso2-power-7'
)
- APP/Controller/ProductController.php line 34 → Product->findByLink(string)
public function chitietsanpham($id = null) {
$detailNews = $this->Product->findBySlug($id);
if(!$detailNews) $detailNews = $this->Product->findByLink($id);
if(!$detailNews){
'may-toan-dac-dien-tu-leica-tso2-power-7'
- [internal function] → ProductController->chitietsanpham(string)
'may-toan-dac-dien-tu-leica-tso2-power-7'
- 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 => 'chitietsanpham'
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 => 'may-toan-dac-dien-tu-leica-tso2-power-7'
)
- 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 => 'may-toan-dac-dien-tu-leica-tso2-power-7.html'
base => ''
webroot => '/'
here => '/may-toan-dac-dien-tu-leica-tso2-power-7.html'
}
- 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 => 'chitietsanpham'
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 => 'may-toan-dac-dien-tu-leica-tso2-power-7.html'
base => ''
webroot => '/'
here => '/may-toan-dac-dien-tu-leica-tso2-power-7.html'
}
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 => 'may-toan-dac-dien-tu-leica-tso2-power-7.html'
base => ''
webroot => '/'
here => '/may-toan-dac-dien-tu-leica-tso2-power-7.html'
}
object(CakeResponse) {
}