[wp-trac] [WordPress Trac] #8468: Publishing/Saving new post after
2.6 to 2.6.5 produces incorrect SQL syntax errors
WordPress Trac
wp-trac at lists.automattic.com
Wed Dec 3 10:34:11 GMT 2008
#8468: Publishing/Saving new post after 2.6 to 2.6.5 produces incorrect SQL syntax
errors
----------------------------+-----------------------------------------------
Reporter: dolemite | Owner: anonymous
Type: defect | Status: new
Priority: normal | Milestone: 2.8
Component: Administration | Version:
Severity: major | Keywords:
----------------------------+-----------------------------------------------
I just updated my wordpress blog (http://www.azvibe.com) from 2.6 to 2.6.5
(no intermediate upgrades and the upgrade seemed to go fine. However, when
I went to write and then publish a new post, received the errors noted in
Exhibit A at the bottom of the ticket.
I then took one of the sql commands from the error and then plugged it
into phpMyAdmin SQL query analyzer:
SELECT ID AS 'ID', post_date AS 'post_date', post_title AS 'post_title'
FROM wp_posts WHERE post_date > '2008-12-01 00:00:00' AND post_date <
'2009-01-01 00:00:00' AND post_status = 'publish' AND post_type = 'post'
ORDER BY
...and it came back with this error:
'''SQL query:
SELECT ID AS 'ID', post_date AS 'post_date', post_title AS 'post_title'
FROM wp_posts
WHERE post_date > '2008-12-01 00:00:00'
AND post_date < '2009-01-01 00:00:00'
AND post_status = 'publish'
AND post_type = 'post'
ORDER BY
LIMIT 0 , 30
MySQL said:
#1064 - 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
'LIMIT 0, 30' at line 2'''
Here's the original unanswered support ticket with some more information:
[http://wordpress.org/support/topic/221833?replies=5#post-913826]
I'm attaching a copy of post.php for you to look over. If any other files
are needed please let me know
'''Exhibit A:'''
post.php after attempting to save and/or publish the page came up with the
following errors:
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 ID AS 'ID', post_date AS 'post_date', post_title AS 'post_title'
FROM wp_posts WHERE post_date > '2008-12-01 00:00:00' AND post_date <
'2009-01-01 00:00:00' AND post_status = 'publish' AND post_type = 'post'
ORDER BY
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 ID AS 'ID', post_date AS 'post_date', post_title AS 'post_title'
FROM wp_posts WHERE post_date > '2008-11-01 00:00:00' AND post_date <
'2008-12-01 00:00:00' AND post_status = 'publish' AND post_type = 'post'
ORDER BY
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 ID AS 'ID', post_date AS 'post_date', post_title AS 'post_title'
FROM wp_posts WHERE post_date > '2008-10-01 00:00:00' AND post_date <
'2008-11-01 00:00:00' AND post_status = 'publish' AND post_type = 'post'
ORDER BY
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 ID AS 'ID', post_date AS 'post_date', post_title AS 'post_title'
FROM wp_posts WHERE post_date > '2008-09-01 00:00:00' AND post_date <
'2008-10-01 00:00:00' AND post_status = 'publish' AND post_type = 'post'
ORDER BY
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 ID AS 'ID', post_date AS 'post_date', post_title AS 'post_title'
FROM wp_posts WHERE post_date > '2008-08-01 00:00:00' AND post_date <
'2008-09-01 00:00:00' AND post_status = 'publish' AND post_type = 'post'
ORDER BY
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 ID AS 'ID', post_date AS 'post_date', post_title AS 'post_title'
FROM wp_posts WHERE post_date > '2008-07-01 00:00:00' AND post_date <
'2008-08-01 00:00:00' AND post_status = 'publish' AND post_type = 'post'
ORDER BY
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 ID AS 'ID', post_date AS 'post_date', post_title AS 'post_title'
FROM wp_posts WHERE post_date > '2008-06-01 00:00:00' AND post_date <
'2008-07-01 00:00:00' AND post_status = 'publish' AND post_type = 'post'
ORDER BY
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 ID AS 'ID', post_date AS 'post_date', post_title AS 'post_title'
FROM wp_posts WHERE post_date > '2008-12-01 00:00:00' AND post_date <
'2009-01-01 00:00:00' AND post_status = 'publish' AND post_type = 'post'
ORDER BY
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 ID AS 'ID', post_date AS 'post_date', post_title AS 'post_title'
FROM wp_posts WHERE post_date > '2008-11-01 00:00:00' AND post_date <
'2008-12-01 00:00:00' AND post_status = 'publish' AND post_type = 'post'
ORDER BY
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 ID AS 'ID', post_date AS 'post_date', post_title AS 'post_title'
FROM wp_posts WHERE post_date > '2008-10-01 00:00:00' AND post_date <
'2008-11-01 00:00:00' AND post_status = 'publish' AND post_type = 'post'
ORDER BY
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 ID AS 'ID', post_date AS 'post_date', post_title AS 'post_title'
FROM wp_posts WHERE post_date > '2008-09-01 00:00:00' AND post_date <
'2008-10-01 00:00:00' AND post_status = 'publish' AND post_type = 'post'
ORDER BY
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 ID AS 'ID', post_date AS 'post_date', post_title AS 'post_title'
FROM wp_posts WHERE post_date > '2008-08-01 00:00:00' AND post_date <
'2008-09-01 00:00:00' AND post_status = 'publish' AND post_type = 'post'
ORDER BY
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 ID AS 'ID', post_date AS 'post_date', post_title AS 'post_title'
FROM wp_posts WHERE post_date > '2008-07-01 00:00:00' AND post_date <
'2008-08-01 00:00:00' AND post_status = 'publish' AND post_type = 'post'
ORDER BY
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 ID AS 'ID', post_date AS 'post_date', post_title AS 'post_title'
FROM wp_posts WHERE post_date > '2008-06-01 00:00:00' AND post_date <
'2008-07-01 00:00:00' AND post_status = 'publish' AND post_type = 'post'
ORDER BY
Warning: Cannot modify header information - headers already sent by
(output started at <absolute path on server>/wp-includes/wp-db.php:517) in
<absolute path on server>/wp-includes/pluggable.php on line 770
--
Ticket URL: <http://trac.wordpress.org/ticket/8468>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list