I’ve been getting the following error in my WP root error.log ever since my host upgraded their servers to the latest versions of PHP and MySQL. Does anyone have a clue as top what the cause of this is?
[29-Jan-2008 04:55:36] WordPress database error 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 ‘AND comment_approved = ‘1’ ORDER BY comment_date_gmt DESC LIMIT 5′ at line 1 for query SELECT wp_comments.* FROM wp_comments WHERE comment_post_ID = AND comment_approved = ‘1’ ORDER BY comment_date_gmt DESC LIMIT 5
The only comment plugins I use are Akismet and WP Ajax Edit Comments which never caused a problem before. Since then I’ve deactivated WP Ajax and switched from Aksimet to Defensio just for troubleshooting purposes–no change. This error hasn’t seemed to have any affect on the site functions at all, it’s just annoying that I can’t find the cause.
I also upgraded to 2.3.2 just prior to the server upgrade so it might be something to do with WP 2.3.2 as well, I’m not sure and I do not have the coding ability (yet) to track down something like this beyond basic troubleshooting. Looks like it might have to do with 2.3.2 commenting functions–still working on it and any help would be appreciated. Thanks!
I’m WP 2.3.2 on PHP 5.2.5 and MySQL 5.0.45
- The topic ‘SQL Error regarding comments and syntax’ is closed to new replies.