id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc,focuses 8468,Publishing/Saving new post after 2.6 to 2.6.5 produces incorrect SQL syntax errors,dolemite,,"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 Warning: Cannot modify header information - headers already sent by (output started at /wp-includes/wp-db.php:517) in /wp-includes/pluggable.php on line 770",defect (bug),closed,normal,,Administration,2.6,major,invalid,reporter-feedback,,