SELECT * FROM jirei WHERE (0 OR cate_id_all LIKE '%%') AND disp = 1 AND jirei_id <> ORDER BY sort_level DESC, year DESC, month DESC

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 'ORDER BY sort_level DESC, year DESC, month DESC LIMIT 0,4' at line 1