Si no tienes cuenta Regístrate.
Database Error
Error:
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'Book.created' in 'order clause'
SQL Query:
SELECT `Book3`.*, concat( if(saga="","",saga), if(orden=0,"", concat (" - ",orden)) ) as ssaga FROM `books` AS `Book3` WHERE 1 = 1 and Book3.relato='1' group by Book3.id ORDER BY Book.created desc limit 30, 10;
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 `Book3`.*, concat( if(saga="","",saga), if(orden=0,"", concat (" - ",orden)) ) as ssaga FROM `books` AS `Book3` WHERE 1 = 1 and Book3.relato='1' group by Book3.id ORDER BY Book.created desc limit 30, 10;'
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 `Book3`.*, concat( if(saga="","",saga), if(orden=0,"", concat (" - ",orden)) ) as ssaga FROM `books` AS `Book3` WHERE 1 = 1 and Book3.relato='1' group by Book3.id ORDER BY Book.created desc limit 30, 10;'
array()
array()
- CORE/Cake/Model/Datasource/DboSource.php line 540 → DboSource->fetchAll(string)
$recursive = null;
if (count($args) === 1) {
return $this->fetchAll($args[0]);
} elseif (count($args) > 1 && (strpos($args[0], 'findBy') === 0 || strpos($args[0], 'findAllBy') === 0)) {
'SELECT `Book3`.*, concat( if(saga="","",saga), if(orden=0,"", concat (" - ",orden)) ) as ssaga FROM `books` AS `Book3` WHERE 1 = 1 and Book3.relato='1' group by Book3.id ORDER BY Book.created desc limit 30, 10;'
- [internal function] → DboSource->query(string)
'SELECT `Book3`.*, concat( if(saga="","",saga), if(orden=0,"", concat (" - ",orden)) ) as ssaga FROM `books` AS `Book3` WHERE 1 = 1 and Book3.relato='1' group by Book3.id ORDER BY Book.created desc limit 30, 10;'
- CORE/Cake/Model/Model.php line 2997 → call_user_func_array(array, array)
public function query($sql) {
$params = func_get_args();
$db = $this->getDataSource();
return call_user_func_array(array(&$db, 'query'), $params);
}
array(
(int) 0 => object(Mysql) {},
(int) 1 => 'query'
)
array(
(int) 0 => 'SELECT `Book3`.*, concat( if(saga="","",saga), if(orden=0,"", concat (" - ",orden)) ) as ssaga FROM `books` AS `Book3` WHERE 1 = 1 and Book3.relato='1' group by Book3.id ORDER BY Book.created desc limit 30, 10;'
)
- APP/Model/Book3.php line 88 → Model->query(string)
else
$query = "SELECT `Book3`.*, FROM `books` AS `Book3` left join books_tags on books_tags.book_id=Book3.id WHERE books_tags.tag_id=$tag group by Book3.id $order1 limit $offset, $limit;";
$posts = $this->query($query);
'SELECT `Book3`.*, concat( if(saga="","",saga), if(orden=0,"", concat (" - ",orden)) ) as ssaga FROM `books` AS `Book3` WHERE 1 = 1 and Book3.relato='1' group by Book3.id ORDER BY Book.created desc limit 30, 10;'
- CORE/Cake/Controller/Component/PaginatorComponent.php line 167 → Book3->paginate(array, null, array, integer, integer, integer, array)
if ($object->hasMethod('paginate')) {
$results = $object->paginate(
$conditions, $fields, $order, $limit, $page, $recursive, $extra
);
} else {
array(
'Book3.relato' => (int) 1
)
null
array(
'Book.created' => 'desc'
)
(int) 10
(int) 4
(int) 0
array(
'maxLimit' => (int) 100,
'paramType' => 'named',
'sort' => 'Book.created',
'direction' => 'desc'
)
- APP/Controller/BooksController.php line 120 → PaginatorComponent->paginate(string)
)
);
$this->Book3->recursive = 0;
$data = $this->Paginator->paginate('Book3');
$this->set('books', $data);
- [internal function] → BooksController->relatos()
- CORE/Cake/Controller/Controller.php line 485 → ReflectionMethod->invokeArgs(BooksController, array)
'action' => $request->params['action']
));
}
return $method->invokeArgs($this, $request->params['pass']);
object(BooksController) {
components => array(
[maximum depth reached]
)
uses => array(
[maximum depth reached]
)
helpers => array(
[maximum depth reached]
)
confirmado => null
user => null
user_id => null
name => 'Books'
request => object(CakeRequest) {}
response => object(CakeResponse) {}
viewPath => 'Books'
layoutPath => null
viewVars => array(
[maximum depth reached]
)
view => 'relatos'
layout => 'default'
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 => 'Book'
modelKey => 'book'
validationErrors => null
Auth => object(AuthComponent) {}
RequestHandler => object(RequestHandlerComponent) {}
AutoLogin => object(AutoLoginComponent) {}
Session => object(SessionComponent) {}
Connect => object(ConnectComponent) {}
Cookie => object(CookieComponent) {}
Paginator => object(PaginatorComponent) {}
Attachment => object(AttachmentComponent) {}
Book3 => object(Book3) {}
}
array()
- 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 => 'books/relatos/page:4/sort:Book.created/direction:desc'
base => ''
webroot => '/'
here => '/books/relatos/page:4/sort:Book.created/direction:desc'
}
- CORE/Cake/Routing/Dispatcher.php line 161 → Dispatcher->_invoke(BooksController, CakeRequest, CakeResponse)
));
}
$response = $this->_invoke($controller, $request, $response);
if (isset($request->params['return'])) {
object(BooksController) {
components => array(
[maximum depth reached]
)
uses => array(
[maximum depth reached]
)
helpers => array(
[maximum depth reached]
)
confirmado => null
user => null
user_id => null
name => 'Books'
request => object(CakeRequest) {}
response => object(CakeResponse) {}
viewPath => 'Books'
layoutPath => null
viewVars => array(
[maximum depth reached]
)
view => 'relatos'
layout => 'default'
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 => 'Book'
modelKey => 'book'
validationErrors => null
Auth => object(AuthComponent) {}
RequestHandler => object(RequestHandlerComponent) {}
AutoLogin => object(AutoLoginComponent) {}
Session => object(SessionComponent) {}
Connect => object(ConnectComponent) {}
Cookie => object(CookieComponent) {}
Paginator => object(PaginatorComponent) {}
Attachment => object(AttachmentComponent) {}
Book3 => object(Book3) {}
}
object(CakeRequest) {
params => array(
[maximum depth reached]
)
data => array([maximum depth reached])
query => array([maximum depth reached])
url => 'books/relatos/page:4/sort:Book.created/direction:desc'
base => ''
webroot => '/'
here => '/books/relatos/page:4/sort:Book.created/direction:desc'
}
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 => 'books/relatos/page:4/sort:Book.created/direction:desc'
base => ''
webroot => '/'
here => '/books/relatos/page:4/sort:Book.created/direction:desc'
}
object(CakeResponse) {
}