I just encountered this problem when I tried to delete a comment. I did a search of the board and came up with nothing, so I thought that I would post. I hope that I am not double posting an issue, but I never found an answer here.
Anyway, I got this error when I tried to delete a comment:
[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 '' at line 1]
SELECT * FROM wp_users WHERE ID =
Warning: Cannot modify header information - headers already sent by (output started at /home/pushco/public_html/blog/wp-includes/wp-db.php:106) in /home/pushco/public_html/blog/wp-admin/post.php on line 497
I looked up line 497, and it is this:
header('Location: ' . $HTTP_SERVER_VARS['HTTP_REFERER']);