Fatal error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY RAND(), p.destaque DESC LIMIT 12' at line 1 - SELECT DISTINCT(p.id_produtos), p.* FROM tb_produtos p INNER JOIN tr_imagens_produtos tr USING(id_produtos) WHERE ativo=1 AND id_categorias= ORDER BY RAND(), p.destaque DESC LIMIT 12 in /var/www/html/classes/banco.class.php on line 103