Произошла ошибка

Неверный запрос: select m.*,i.ext,'/img/db/trumb' as path_trumb,m.titleRUS as title,m.anonsRUS as anons,m.contentRUS as content,DATE_FORMAT(m.DC,'%d/%m/%Y %H:%i:%S') as DC_format,DATE_FORMAT(m.DC,'%d/%m/%Y') as DC_date,DATE_FORMAT(m.DC,'%d.%m.%Y') as DC_date_point,DATE_FORMAT(m.DC,'%H:%i:%S') as DC_time,if(m.id=-1,1,0) as active,DATE_FORMAT(m.DC,'%d') as DC_day,DATE_FORMAT(m.DC,'%m') as DC_month,DATE_FORMAT(m.DC,'%Y') as DC_year,DATE_FORMAT(m.DC,'%y') as DC_year2 from material m left join image i on m.img=i.id where m.id in (1185,1000,989,986,981,979,891,7) and m.type=0 and m.enable and m.top=0 order by active desc,m.id=1185 desc,m.id=1000 desc,m.id=989 desc,m.id=986 desc,m.id=981 desc,m.id=979 desc,m.id=891 desc,m.id=7 desc limit -1
Ошибка: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-1' at line 1