When I create a new post or make changes to an existing post, I get the following error message just below the post editor:
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 '' at line 1]
select post_content from wp_posts where id=
I got this today without having made any changes I can think of, other than publishing a new post, like I’ve done hundreds of times already.
If I ignore this message and click “Update Post” or “Save Draft”, I get the same error message displayed in a page by itself. Sometimes, the message appears twice.
OK, this is official weird. With YARPP still deactivated, I created a new drafts post. While I was editing it, WordPress auto-saved once without a problem, but then I got the $%&#*$ error again when I published the post.
IMPORTANT: the saving operations actually succeed, so next time, I see my changed applied. The problem occurs after saving.