SQL error when adding new post
-
I just upgraded my wordpress from 3.1.2 to 3.1.3. The upgrade was done by replacing the existing installation folder with the latest version, not using wordpress’ built in upgrade facility.
After copying across the new version, I visited the admin area, but didn’t get a message about the database needing to be upgraded. After investigating I understand that this is because the database version is the same for 3.1.2 and 3.1.3, and so didn’t need to be upgraded.
Now when I click to add a new post, the new post page opens, but at the top of the page it says:
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 ( (post.post_status=’inherit’ AND post.post_’ at line 5]
SELECT *,parent.post_status FROM wp_posts parent, wp_posts post WHERE (parent.post_status=’publish’ OR parent.post_status=’private’) AND post.ID= AND ( (post.post_status=’inherit’ AND post.post_parent=parent.ID) OR (parent.ID=post.ID) ) AND post.post_type!=’nav_menu_item’ AND post.post_type!=’revision’ AND post.post_type!=’attachment’Can anyone help me with fixing this error?
Thanks
Dave
- The topic ‘SQL error when adding new post’ is closed to new replies.