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 '-12, 30' at line 28: select, phorum_messages.datestamp,, phorum_messages.message_id, phorum_messages.meta, phorum_messages.moderator_post, phorum_messages.modifystamp, phorum_messages.parent_id, phorum_messages.sort, phorum_messages.status, phorum_messages.subject, phorum_messages.thread, phorum_messages.thread_count, phorum_messages.user_id, phorum_messages.viewcount from phorum_messages use index (list_page_float) where modifystamp>0 and forum_id=2 and parent_id=0 and status=2 and sort>1 order by modifystamp desc limit -12, 30