A Database Error Occurred

Error Number: 1064

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 'AND id IN(SELECT id_produto FROM imagens_produtos_db where ativo = '1') ORDER...' at line 5

SELECT * FROM (`produtos_db`) WHERE ativo = 1 AND id <> AND id IN(SELECT id_produto FROM imagens_produtos_db where ativo = '1') ORDER BY `produtos_db`.`ordem` asc

Filename: /home/lhombre/www/core/MY_Model.php

Line Number: 277