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 'html;/com' at line 1 Failed query: SELECT * FROM rate_forum_threads LEFT JOIN rate_forums ON t_forum=f_id WHERE t_id=222.html;/com