Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 3065 Expression #1 of ORDER BY clause is not in SELECT list, references column 'guiacatalao.td.prioridade' which is not in SELECT list; this is incompatible with DISTINCT in /var/www/public_html/site/Classes/empresa/Empresa.php:138
Stack trace:
#0 /var/www/public_html/site/Classes/empresa/Empresa.php(138): PDOStatement->execute()
#1 /var/www/public_html/site/tiles/subcategoria.php(12): Empresa->Listagem('subcategoria', 'hospitais', NULL, 0, 40)
#2 /var/www/public_html/site/modulos/categorias.php(12): include_once('/var/www/public...')
#3 /var/www/public_html/site/helpers/funcoes.php(7): include_once('/var/www/public...')
#4 /var/www/public_html/site/controller.php(42): loadmodulo('categorias')
#5 {main}
thrown in /var/www/public_html/site/Classes/empresa/Empresa.php on line 138