• I had a couple of draft posts that mysteriously appeared. I tried deleting each one and while the delete appeared to be successful, I did get the following error each time:

    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 p.post_date_gmt < ‘2006-09-19 13:36:55′ ORDER By p.post_date DESC’ at line 6]
    SELECT DISTINCT MONTH(p.post_date) AS month FROM wp_posts p INNER JOIN wp_post2cat p2c ON (p.ID = p2c.post_id ) WHERE YEAR(p.post_date) = AND p.post_date_gmt < ‘2006-09-19 13:36:55’ ORDER By p.post_date DESC

    Any ideas? This is WP 2.04.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The offending bit is WHERE YEAR(p.post_date) = AND which is quite odd. Lost the date it would appear.

    How did you do the deletions of the draft posts?

    Thread Starter mattmend

    (@mattmend)

    I first clicked ‘edit’ from the manage screen. Then clicked ‘delete post’ at the bottom of the ‘write post’ page.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Database error when deleting draft posts’ is closed to new replies.