Title: Error posting
Last modified: August 18, 2016

---

# Error posting

 *  [amacgenius](https://wordpress.org/support/users/amacgenius/)
 * (@amacgenius)
 * [20 years, 2 months ago](https://wordpress.org/support/topic/error-posting/)
 * 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](https://wordpress.org/support/users/amacgenius/)
 * (@amacgenius)
 * [20 years, 2 months ago](https://wordpress.org/support/topic/error-posting/#post-332059)
 * Nobody?
 *  Thread Starter [amacgenius](https://wordpress.org/support/users/amacgenius/)
 * (@amacgenius)
 * [20 years, 2 months ago](https://wordpress.org/support/topic/error-posting/#post-332150)
 * This is a really annoying error I’d like to fix…anybody help?
 *  Thread Starter [amacgenius](https://wordpress.org/support/users/amacgenius/)
 * (@amacgenius)
 * [20 years, 2 months ago](https://wordpress.org/support/topic/error-posting/#post-332224)
 * ANYBODY, this is seriously **annoying**!
 *  [asanocki](https://wordpress.org/support/users/asanocki/)
 * (@asanocki)
 * [20 years, 1 month ago](https://wordpress.org/support/topic/error-posting/#post-332282)
 * 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?
 *  [lassmann](https://wordpress.org/support/users/lassmann/)
 * (@lassmann)
 * [20 years, 1 month ago](https://wordpress.org/support/topic/error-posting/#post-332290)
 * I’ve got the same problem here (although i only get one of them.)..
    help us 
   please!
 *  [caparks](https://wordpress.org/support/users/caparks/)
 * (@caparks)
 * [20 years, 1 month ago](https://wordpress.org/support/topic/error-posting/#post-332307)
 * Hey gang!
 * I had the exact same problem and posted it here: [http://wordpress.org/support/topic/63370?replies=3](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
 *  [jesterz](https://wordpress.org/support/users/jesterz/)
 * (@jesterz)
 * [20 years, 1 month ago](https://wordpress.org/support/topic/error-posting/#post-332311)
 * 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).
 *  [jesterz](https://wordpress.org/support/users/jesterz/)
 * (@jesterz)
 * [20 years, 1 month ago](https://wordpress.org/support/topic/error-posting/#post-332312)
 * 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!
 *  [lassmann](https://wordpress.org/support/users/lassmann/)
 * (@lassmann)
 * [20 years ago](https://wordpress.org/support/topic/error-posting/#post-332325)
 * sorry folks – none of them works for me.. turned off all my plugins – to no avail..
 *  [williambrandes](https://wordpress.org/support/users/williambrandes/)
 * (@williambrandes)
 * [20 years ago](https://wordpress.org/support/topic/error-posting/#post-332336)
 * 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
 *  [komakino](https://wordpress.org/support/users/komakino/)
 * (@komakino)
 * [20 years ago](https://wordpress.org/support/topic/error-posting/#post-332337)
 * 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.
 *  [bitworker](https://wordpress.org/support/users/bitworker/)
 * (@bitworker)
 * [20 years ago](https://wordpress.org/support/topic/error-posting/#post-332338)
 * 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.
 *  [lassmann](https://wordpress.org/support/users/lassmann/)
 * (@lassmann)
 * [20 years ago](https://wordpress.org/support/topic/error-posting/#post-332341)
 * found a solution to my problem here
    [http://wordpress.org/support/topic/37614?replies=2#post-360521](http://wordpress.org/support/topic/37614?replies=2#post-360521)

Viewing 13 replies - 1 through 13 (of 13 total)

The topic ‘Error posting’ is closed to new replies.

## Tags

 * [MySQL](https://wordpress.org/support/topic-tag/mysql/)
 * [WordPress database error](https://wordpress.org/support/topic-tag/wordpress-database-error/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 13 replies
 * 8 participants
 * Last reply from: [lassmann](https://wordpress.org/support/users/lassmann/)
 * Last activity: [20 years ago](https://wordpress.org/support/topic/error-posting/#post-332341)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
