Warning (512): _cake_core_ cache was unable to write 'cake_dev_eng' to Memcached cache [CORE/Cake/Cache/Cache.php, line 328]
Warning (512): _cake_model_ cache was unable to write 'default_meumunicipio_list' to Memcached cache [CORE/Cake/Cache/Cache.php, line 328]
Warning (512): _cake_model_ cache was unable to write 'default_meumunicipio_list' to Memcached cache [CORE/Cake/Cache/Cache.php, line 328]
Warning (512): _cake_model_ cache was unable to write 'default_configs' to Memcached cache [CORE/Cake/Cache/Cache.php, line 328]
Warning (512): _cake_model_ cache was unable to write 'default_configs' to Memcached cache [CORE/Cake/Cache/Cache.php, line 328]
Warning (512): especifico cache was unable to write 'config_geral' to Memcached cache [CORE/Cake/Cache/Cache.php, line 328]
Warning (512): _cake_model_ cache was unable to write 'default_exercicios' to Memcached cache [CORE/Cake/Cache/Cache.php, line 328]
Warning (512): _cake_model_ cache was unable to write 'default_exercicios' to Memcached cache [CORE/Cake/Cache/Cache.php, line 328]
Warning (512): especifico cache was unable to write 'exercicio_atual' to Memcached cache [CORE/Cake/Cache/Cache.php, line 328]
Warning (512): _cake_core_ cache was unable to write 'cake_eng' to Memcached cache [CORE/Cake/Cache/Cache.php, line 328]
Warning (512): _cake_model_ cache was unable to write 'default_materias' to Memcached cache [CORE/Cake/Cache/Cache.php, line 328]
Warning (512): _cake_model_ cache was unable to write 'default_materias' to Memcached cache [CORE/Cake/Cache/Cache.php, line 328]
Warning (2): file_put_contents(/var/www/html/app/tmp/logs/error.log) [<a href='http://php.net/function.file-put-contents'>function.file-put-contents</a>]: failed to open stream: Permission denied [CORE/Cake/Log/Engine/FileLog.php, line 142]
Warning (512): especifico cache was unable to write 'config_geral' to Memcached cache [CORE/Cake/Cache/Cache.php, line 328]
Warning (512): especifico cache was unable to write 'exercicio_atual' to Memcached cache [CORE/Cake/Cache/Cache.php, line 328]
Errors - Meu Município

Database Error

Error: SQLSTATE[42601]: Syntax error: 7 ERROR: syntax error at or near "AS" LINE 1: ...'Y' order by ordem, id limit 1) as video_youtube" AS (select... ^

SQL Query: SELECT "Materia"."id" AS "Materia__id", "Materia"."titulo" AS "Materia__titulo", "Materia"."datapublicacao" AS "Materia__datapublicacao", "Materia"."resumo" AS "Materia__resumo", "Materia"."texto" AS "Materia__texto", "Materia"."foto_capa" AS "Materia__foto_capa", (select reference from materia_medias where materia_id = Materia."id and deleted = 0 and tipo = 'Y' order by ordem, id limit 1) as video_youtube" AS (select reference from materia_medias where materia_id = Materia__id and deleted = 0 and tipo = 'Y' order by ordem, id limit 1) as video_youtube FROM "public"."materias" AS "Materia" LEFT JOIN "public"."users" AS "User" ON ("Materia"."user_id" = "User"."id") WHERE "Materia"."deleted" = 'FALSE' AND "Materia"."status" = 'P' AND "Materia"."datapublicacao" <= now() ORDER BY "Materia"."datapublicacao" desc LIMIT 2

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 470PDOStatement->execute(array)
  • CORE/Cake/Model/Datasource/DboSource.php line 436DboSource->_execute(string, array)
  • CORE/Cake/Model/Datasource/DboSource.php line 673DboSource->execute(string, array, array)
  • CORE/Cake/Model/Datasource/DboSource.php line 1184DboSource->fetchAll(string, boolean)
  • CORE/Cake/Model/Model.php line 3038DboSource->read(Materia, array)
  • CORE/Cake/Model/Model.php line 3010Model->_readDataSource(string, array)
  • APP/Model/Materia.php line 149Model->find(string, array)
  • APP/Controller/Eleicoes2016Controller.php line 34Materia->retornaListaUltimasMaterias(integer)
  • [internal function]Eleicoes2016Controller->index()
  • CORE/Cake/Controller/Controller.php line 491ReflectionMethod->invokeArgs(Eleicoes2016Controller, array)
  • CORE/Cake/Routing/Dispatcher.php line 193Controller->invokeAction(CakeRequest)
  • CORE/Cake/Routing/Dispatcher.php line 167Dispatcher->_invoke(Eleicoes2016Controller, CakeRequest)
  • APP/webroot/index.php line 108Dispatcher->dispatch(CakeRequest, CakeResponse)
Warning (512): _cake_core_ cache was unable to write 'file_map' to Memcached cache [CORE/Cake/Cache/Cache.php, line 328]
Warning (512): _cake_core_ cache was unable to write 'method_cache' to Memcached cache [CORE/Cake/Cache/Cache.php, line 328]