Si no tienes cuenta Regístrate.
Database Error
Error:
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '%Editorial Club Universitario (ECU)% group by Book.id limit 0, 20' at line 1
SQL Query:
SELECT `Book`.*, avg((ifnull(Rating.valor,0))) as avg, concat( if(saga="","",saga), if(orden=0,"", concat (" - ",orden)) ) as ssaga FROM `books` AS `Book` LEFT JOIN `ratings` AS `Rating` ON (`Rating`.`book_id` = `Book`.`id`) WHERE 1 = 1 and editorial like%Editorial Club Universitario (ECU)% group by Book.id limit 0, 20;
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 `Book`.*, avg((ifnull(Rating.valor,0))) as avg, concat( if(saga="","",saga), if(orden=0,"", concat (" - ",orden)) ) as ssaga FROM `books` AS `Book` LEFT JOIN `ratings` AS `Rating` ON (`Rating`.`book_id` = `Book`.`id`) WHERE 1 = 1 and editorial like%Editorial Club Universitario (ECU)% group by Book.id limit 0, 20;'
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 `Book`.*, avg((ifnull(Rating.valor,0))) as avg, concat( if(saga="","",saga), if(orden=0,"", concat (" - ",orden)) ) as ssaga FROM `books` AS `Book` LEFT JOIN `ratings` AS `Rating` ON (`Rating`.`book_id` = `Book`.`id`) WHERE 1 = 1 and editorial like%Editorial Club Universitario (ECU)% group by Book.id limit 0, 20;'
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 `Book`.*, avg((ifnull(Rating.valor,0))) as avg, concat( if(saga="","",saga), if(orden=0,"", concat (" - ",orden)) ) as ssaga FROM `books` AS `Book` LEFT JOIN `ratings` AS `Rating` ON (`Rating`.`book_id` = `Book`.`id`) WHERE 1 = 1 and editorial like%Editorial Club Universitario (ECU)% group by Book.id limit 0, 20;'
- [internal function] → DboSource->query(string)
'SELECT `Book`.*, avg((ifnull(Rating.valor,0))) as avg, concat( if(saga="","",saga), if(orden=0,"", concat (" - ",orden)) ) as ssaga FROM `books` AS `Book` LEFT JOIN `ratings` AS `Rating` ON (`Rating`.`book_id` = `Book`.`id`) WHERE 1 = 1 and editorial like%Editorial Club Universitario (ECU)% group by Book.id limit 0, 20;'
- 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 `Book`.*, avg((ifnull(Rating.valor,0))) as avg, concat( if(saga="","",saga), if(orden=0,"", concat (" - ",orden)) ) as ssaga FROM `books` AS `Book` LEFT JOIN `ratings` AS `Rating` ON (`Rating`.`book_id` = `Book`.`id`) WHERE 1 = 1 and editorial like%Editorial Club Universitario (ECU)% group by Book.id limit 0, 20;'
)
- APP/Model/Book.php line 147 → Model->query(string)
else
$query = "SELECT `Book`.*, avg((ifnull(Rating.valor,0))) as avg FROM `books` AS `Book` LEFT JOIN `ratings` AS `Rating` ON (`Rating`.`book_id` = `Book`.`id`) left join books_tags on books_tags.book_id=Book.id WHERE books_tags.tag_id=$tag group by Book.id $order1 limit $offset, $limit;";
$posts = $this->query($query);
'SELECT `Book`.*, avg((ifnull(Rating.valor,0))) as avg, concat( if(saga="","",saga), if(orden=0,"", concat (" - ",orden)) ) as ssaga FROM `books` AS `Book` LEFT JOIN `ratings` AS `Rating` ON (`Rating`.`book_id` = `Book`.`id`) WHERE 1 = 1 and editorial like%Editorial Club Universitario (ECU)% group by Book.id limit 0, 20;'
- CORE/Cake/Controller/Component/PaginatorComponent.php line 167 → Book->paginate(array, null, null, integer, integer, integer, array)
if ($object->hasMethod('paginate')) {
$results = $object->paginate(
$conditions, $fields, $order, $limit, $page, $recursive, $extra
);
} else {
array(
'editorial like' => '%Editorial Club Universitario (ECU)%'
)
null
null
(int) 20
(int) 1
(int) 1
array(
'maxLimit' => (int) 100,
'paramType' => 'named'
)
- CORE/Cake/Controller/Controller.php line 1082 → PaginatorComponent->paginate(Book, array, array)
* @deprecated Use PaginatorComponent instead
*/
public function paginate($object = null, $scope = array(), $whitelist = array()) {
return $this->Components->load('Paginator', $this->paginate)->paginate($object, $scope, $whitelist);
}
object(Book) {
actAs => array(
[maximum depth reached]
)
hasMany => array(
[maximum depth reached]
)
hasAndBelongsToMany => array(
[maximum depth reached]
)
validate => array(
[maximum depth reached]
)
useDbConfig => 'default'
useTable => 'books'
id => null
data => array([maximum depth reached])
schemaName => 'ficcionc_tannhauser'
table => 'books'
primaryKey => 'id'
validationErrors => array([maximum depth reached])
validationDomain => null
tablePrefix => ''
name => 'Book'
alias => 'Book'
tableToModel => array(
[maximum depth reached]
)
cacheQueries => false
belongsTo => array([maximum depth reached])
hasOne => 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]
)
}
array(
'editorial like' => '%Editorial Club Universitario (ECU)%'
)
array()
- APP/Controller/BooksController.php line 1114 → Controller->paginate(Book, array, array)
}
$alias = urldecode($alias);
$b = $this->Paginate($this->Book, array("editorial like" => "%$alias%"), array());
$this->set("editorial", $alias);
object(Book) {
actAs => array(
[maximum depth reached]
)
hasMany => array(
[maximum depth reached]
)
hasAndBelongsToMany => array(
[maximum depth reached]
)
validate => array(
[maximum depth reached]
)
useDbConfig => 'default'
useTable => 'books'
id => null
data => array([maximum depth reached])
schemaName => 'ficcionc_tannhauser'
table => 'books'
primaryKey => 'id'
validationErrors => array([maximum depth reached])
validationDomain => null
tablePrefix => ''
name => 'Book'
alias => 'Book'
tableToModel => array(
[maximum depth reached]
)
cacheQueries => false
belongsTo => array([maximum depth reached])
hasOne => 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]
)
}
array(
'editorial like' => '%Editorial Club Universitario (ECU)%'
)
array()
- [internal function] → BooksController->editorial(string)
'Editorial+Club+Universitario+%28ECU%29'
- 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 => 'editorial'
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) {}
Book => object(Book) {}
}
array(
(int) 0 => 'Editorial+Club+Universitario+%28ECU%29'
)
- 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/editorial/Editorial%2BClub%2BUniversitario%2B%2528ECU%2529'
base => ''
webroot => '/'
here => '/books/editorial/Editorial%2BClub%2BUniversitario%2B%2528ECU%2529'
}
- 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 => 'editorial'
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) {}
Book => object(Book) {}
}
object(CakeRequest) {
params => array(
[maximum depth reached]
)
data => array([maximum depth reached])
query => array([maximum depth reached])
url => 'books/editorial/Editorial%2BClub%2BUniversitario%2B%2528ECU%2529'
base => ''
webroot => '/'
here => '/books/editorial/Editorial%2BClub%2BUniversitario%2B%2528ECU%2529'
}
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/editorial/Editorial%2BClub%2BUniversitario%2B%2528ECU%2529'
base => ''
webroot => '/'
here => '/books/editorial/Editorial%2BClub%2BUniversitario%2B%2528ECU%2529'
}
object(CakeResponse) {
}