WordPress.org

Support

Support » How-To and Troubleshooting » Upgrade to wp2.0.1successfull however get db errors when posting

Upgrade to wp2.0.1successfull however get db errors when posting

  • I upgraded to 2.0.1 today and everything went smooth and now when I post something the post does get into the database and shows up on the website however right after I click on “publish” I get the following errors so I have to manually go back to my wp-admin directory to continue w/other admin tasks:

    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 ‘ON (werdprezz_posts.ID = .post_id) WHERE post_date > 0 AND category_id’ at line 4]
    SELECT tag_id FROM werdprezz_posts INNER JOIN werdprezz_post2cat ON (werdprezz_posts.ID = werdprezz_post2cat.post_id) INNER JOIN ON (werdprezz_posts.ID = .post_id) WHERE post_date > 0 AND category_id <> 11 AND ID = 227 ORDER By post_date DESC

    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 category_id <> 11’ at line 4]
    SELECT post_id FROM werdprezz_post2cat WHERE category_id = AND category_id <> 11

    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 category_id <> 11’ at line 4]
    SELECT post_id FROM werdprezz_post2cat WHERE category_id = AND category_id <> 11

    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 category_id <> 11’ at line 4]
    SELECT post_id FROM werdprezz_post2cat WHERE category_id = AND category_id <> 11

    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 category_id <> 11’ at line 4]
    SELECT post_id FROM werdprezz_post2cat WHERE category_id = AND category_id <> 11

    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 category_id <> 11’ at line 4]
    SELECT post_id FROM werdprezz_post2cat WHERE category_id = AND category_id <> 11

    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 category_id <> 11’ at line 4]
    SELECT post_id FROM werdprezz_post2cat WHERE category_id = AND category_id <> 11

    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 category_id <> 11’ at line 4]
    SELECT post_id FROM werdprezz_post2cat WHERE category_id = AND category_id <> 11

    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 category_id <> 11’ at line 4]
    SELECT post_id FROM werdprezz_post2cat WHERE category_id = AND category_id <> 11

    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 category_id <> 11’ at line 4]
    SELECT post_id FROM werdprezz_post2cat WHERE category_id = AND category_id <> 11

    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 category_id <> 11’ at line 4]
    SELECT post_id FROM werdprezz_post2cat WHERE category_id = AND category_id <> 11

    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 category_id <> 11’ at line 4]
    SELECT post_id FROM werdprezz_post2cat WHERE category_id = AND category_id <> 11

    Warning: Cannot modify header information – headers already sent by (output started at /home/…/public_html/…/wp-includes/wp-db.php:102) in /home/…/public_html/…/wp-admin/post.php on line 59

Viewing 13 replies - 1 through 13 (of 13 total)
  • The same applies when deleting them from the wp-admin

    I tried a fresh install but I guess something in the database is causing the errors 🙁

    Don’t expect any help, I didn’t get any and I posted this 4 days ago…

    http://wordpress.org/support/topic/59752?replies=4

    everysandwich
    Member

    @everysandwich

    Maybe our problems are related, not that I have an answer. I just did the upgrade to the best of my ability and now all of my posts are gone. The front page is up and the sidebar with categories and archives, but they all bring up “not found.” Any help is appreciated.

    same problem.

    semperfidelis
    Member

    @semperfidelis

    Sufian: I have a similar db problem.
    But we can´t fix the db problems listed in here (1 week ago):

    http://wordpress.org/support/topic/59108?replies=95

    Today i just complete my 5° upgrade and 2 fresh install of 2.0.1 version but i still have the db problem when try to post or delete old post.

    i try everything and i can´t find a solution. I give up 🙁

    Hopefully the WordPress geniuses are working on our issue.

    Hey gang!

    I had the exact same problem and posted it here: http://wordpress.org/support/topic/63370?replies=3

    I stopped getting errors after I disabled a couple of my plug-ins (Jeromes Keywords and a WP DB mgmt plug-in] After I turned those off, I no longer had the error.

    Anyway – give it a try and I hope that it helps.

    – caparks

    Hi caparks. I tried that but still no luck. I currently have these plugins installed: Akismet, flickrRSS, WP-contactform, and Extended Live Archives.

    SELECT tag_id FROM werdprezz_posts INNER JOIN werdprezz_post2cat ON (werdprezz_posts.ID = werdprezz_post2cat.post_id) INNER JOIN ON (werdprezz_posts.ID = .post_id) WHERE post_date > 0 AND category_id <> 11 AND ID = 227 ORDER By post_date DESC

    I’m not an expert on the sql functions, but shouldn’t that say ‘wordpress’ instead of ‘werdprezz’?

    mylagoon,

    I believe he just named his database “werdprezz” instead of “wordpress”. That doesn’t seem to be the problem.

    The problem looks to me like it’s in the missing database name here…

    SELECT tag_id FROM werdprezz_posts INNER JOIN werdprezz_post2cat ON (werdprezz_posts.ID = werdprezz_post2cat.post_id) INNER JOIN ON (werdprezz_posts.ID = .post_id) WHERE post_date > 0 AND category_id <> 11 AND ID = 227 ORDER By post_date DESC

    It could also be the double “INNER JOIN ON” blocks…

    SELECT tag_id FROM werdprezz_posts INNER JOIN werdprezz_post2cat ON (werdprezz_posts.ID = werdprezz_post2cat.post_id) INNER JOIN ON (werdprezz_posts.ID = .post_id) WHERE post_date > 0 AND category_id <> 11 AND ID = 227 ORDER By post_date DESC

    I don’t know MySQL/SQL syntax, but I’m betting it has something to do with those blocks.

    Just my $0.02. Hope that helps (I’m working on trying to find how/why that text is generated).

    Follow-up: I’m using the Extended Live Archives plug-in. For some reason, this plug-in assumes I’m using some plug-in called Ultimate Tag Warrior (UTW). Well, I’m not, but the plug-in was detecting UTW and entering the following code block in af-extended-archive-include.php:

    // For UTW
    if($utw_is_present) {
    $query = "SELECT tag_id
    FROM $wpdb->posts
    INNER JOIN $wpdb->post2cat ON ($wpdb->posts.ID = $wpdb->post2cat.post_id)
    INNER JOIN $tablepost2tag ON ($wpdb->posts.ID = $tablepost2tag.post_id)
    WHERE post_date > 0
    $exclusions $dojustid
    ORDER By post_date DESC";
    logthis("SQL Query :".$query, __FUNCTION__, __LINE__);
    $results = $wpdb->get_results($query);
    if ($results) {
    foreach($results as $result) {
    $this->postToGenerate['tag_id'][] = $result->tag_id;
    }
    }
    }
    // End of stuff for UTW

    To fix/patch this, all I did was change the second line to:

    if(0 && $utw_is_present) {

    The “0 &&” short-circuits the conditional and the block gets skipped. Now my post-edits work without a problem!

    Hope that helps!

    Hmm, I’m not using that plug-in. So doesn’t help me. But I’m still looking into the issue.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Upgrade to wp2.0.1successfull however get db errors when posting’ is closed to new replies.