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 'BY DESC LIMIT 0, 16' at line 1 SQL=SELECT a.*, AS user FROM jos_userwall AS a LEFT JOIN jos_users AS b ON = a.user WHERE > 0 AND a.bgid=446ORDER BY DESC LIMIT 0, 16