Notice: Trying to get property of non-object in /var/www/html/delivery_covid.pmvc.ba.gov.br/deliverycovid/www/app/controllers/ListingController.php on line 43

Notice: Trying to get property of non-object in /var/www/html/delivery_covid.pmvc.ba.gov.br/deliverycovid/www/app/controllers/ListingController.php on line 67
Syntax error, unexpected token ORDER, near to ' by rand(34201970) ', when parsing: SELECT CadEmpresas.* FROM RelEmpresasSubCategorias JOIN CadEmpresas ON RelEmpresasSubCategorias.empresa_id = CadEmpresas.id WHERE CadEmpresas.ativo = 1 AND CadEmpresas.status_id = 1 AND RelEmpresasSubCategorias.sub_categoria_id = ORDER by rand(34201970) (477)
#0 [internal function]: Phalcon\Mvc\Model\Query->parse()
#1 [internal function]: Phalcon\Mvc\Model\Query->execute()
#2 /var/www/html/delivery_covid.pmvc.ba.gov.br/deliverycovid/www/app/controllers/ListingController.php(71): Phalcon\Mvc\Model\Manager->executeQuery('SELECT \n       ...')
#3 [internal function]: ListingController->indexAction('83')
#4 [internal function]: Phalcon\Dispatcher->callActionMethod(Object(ListingController), 'indexAction', Array)
#5 [internal function]: Phalcon\Dispatcher->dispatch()
#6 /var/www/html/delivery_covid.pmvc.ba.gov.br/deliverycovid/www/public/index.php(73): Phalcon\Mvc\Application->handle()
#7 {main}