Error: select image_id from tagmap where image_id not in(9602,9601,9512,8988,8854,8040) and tagid= and image_id !='6575' and status=1 order by id desc limit 10

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 image_id !='6575' and status=1 order by id desc limit 10' at line 1