• Ever since the 2.0.1 upgrade everytime I post a new post or edit a post and submit the post/edit – it works but the page spits this back at me:

    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 (wp_posts.ID = .post_id) WHERE post_date > 0 AND category_id <> 7 ‘ at line 4]
    SELECT tag_id FROM wp_posts INNER JOIN wp_post2cat ON (wp_posts.ID = wp_post2cat.post_id) INNER JOIN ON (wp_posts.ID = .post_id) WHERE post_date > 0 AND category_id <> 7 AND ID = 264 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 <> 7’ at line 4]
    SELECT post_id FROM wp_post2cat WHERE category_id = AND category_id <> 7

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

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

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

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

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

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

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

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

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

    Now I’m only good at design, so I haven’t the slightest clue what this means, if somebody could help me that’d be great…

Viewing 13 replies - 1 through 13 (of 13 total)
  • Thread Starter amacgenius

    (@amacgenius)

    Nobody?

    Thread Starter amacgenius

    (@amacgenius)

    This is a really annoying error I’d like to fix…anybody help?

    Thread Starter amacgenius

    (@amacgenius)

    ANYBODY, this is seriously annoying!

    I’m with you — I get the same thing. I’ve tested some save and edits and all I can tell is that it only seems to do it when I add an image to the post, Thumbnail only, that is linked to another page (as opposed to linked to the image or to nothing).

    Thoughts?

    I’ve got the same problem here (although i only get one of them.)..
    help us please!

    Hey gang!

    I had the exact same problem and posted it here: https://www.ads-software.com/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

    I posted this in another thread, but 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!

    sorry folks – none of them works for me.. turned off all my plugins – to no avail..

    Seems to be 2 weeks after the last post. I just installed the latest (first time) and get the errors when editing a PAGE although the page is properly posted. Damn irritating though, especially folks that I’m trying to interest in the tool.

    Same question here. Is anybody home? Should I migrate to an older version? William

    Did run with the same problem on a wordpress 2.0.2 installation and solve it by desactivating the Google Sitemaps 3.0b1 plug-in. Maybe this will help.

    I had the same problem with the photopress plugin for wordpress.
    I have solved the problem by replacing the ‘JOIN’ to ‘LEFT JOIN’ in the php files.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Error posting’ is closed to new replies.