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 '-140,20' at line 1select * from tb_oho_webboard where (confirm=1 and main_id=0 and reg_id='2524' and duedate>='2026-06-27' ) or ( confirm=1 and duedate>='2026-06-27' and ontop>0) order by post_date desc, board_id desc limit -140,20