Title: Cannot edit comments
Last modified: August 18, 2016

---

# Cannot edit comments

 *  [Mark (podz)](https://wordpress.org/support/users/podz/)
 * (@podz)
 * [21 years, 7 months ago](https://wordpress.org/support/topic/cannot-edit-comments/)
 * Try to edit a comment, I get this when I click the ‘Edit Comment’ button:
    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 the first character
   after the word near is always a ‘ I can’t replace all the ‘ in my comments, and
   I can’t always go into the table to change a comment. Any clues ?

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

 *  Thread Starter [Mark (podz)](https://wordpress.org/support/users/podz/)
 * (@podz)
 * [21 years, 7 months ago](https://wordpress.org/support/topic/cannot-edit-comments/#post-101287)
 * Well seeing as this got nothing, could it be related to this error which I see
   in every preview ?
    “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 post_content FROM wp_posts WHERE id=” My blog
   has a 1.3 database as I upgraded then rolled back to 1.2 a while ago (which I
   had hoped would sort this error) and while these don’t interfere as such, it 
   would be nice to get it back to no errors. Nice to squash that error above too.
   I’m sure this error was caused by a plugin too, I just don’t know which one. 
   Or am I stuck with this ? I’m perfectly happy backing up and then messing with
   the db if anyone has any clues.
 *  Thread Starter [Mark (podz)](https://wordpress.org/support/users/podz/)
 * (@podz)
 * [21 years, 7 months ago](https://wordpress.org/support/topic/cannot-edit-comments/#post-101300)
 * Now I get another error:
    “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 ”without-‘ at line 1] SELECT DISTINCT * FROM wp_posts WHERE
   1=1 AND YEAR(post_date)=’2004′ AND MONTH(post_date)=’10’ AND DAYOFMONTH(post_date)
   =’21’ AND post_name = ‘without- “ This is under my latest post: [http://www.tamba2.org.uk/T2/archives/2004/10/21/without-limit-of-time/](http://www.tamba2.org.uk/T2/archives/2004/10/21/without-limit-of-time/)
   Can anyone anywhere shed any light at all on these errors I’m getting ? Anything
   to go on, anywhere to start looking, anything to try, anything not to try – in
   fact, just about anything at all ? My .htaccess has utf-8 in as does the charset
   if that would be thought a cause. Anyone ?
 *  [Mark Jaquith](https://wordpress.org/support/users/markjaquith/)
 * (@markjaquith)
 * [21 years, 7 months ago](https://wordpress.org/support/topic/cannot-edit-comments/#post-101301)
 * One thing I see:
 * > SELECT post_content FROM wp_posts WHERE id=”
 * Shouldn’t that be “ID” (capitalized)?
    How did you “roll back” to 1.2? The error
   on that post seem to be inside of <p class=”postnav”> It is your latest entry,
   so maybe you have some “previous/next” link code that hiccups on the latest entry(
   for which there IS no next entry).
 *  Thread Starter [Mark (podz)](https://wordpress.org/support/users/podz/)
 * (@podz)
 * [21 years, 7 months ago](https://wordpress.org/support/topic/cannot-edit-comments/#post-101302)
 * A full search of a site backup shows there was one instance of ‘id’ in the plugin
   that provides a word counts when (more..) is used.
    It did read: (“SELECT post_content
   FROM $tableposts WHERE id=$id”); it now reads: (“SELECT post_content FROM $tableposts
   WHERE ID=$id”); and the 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 post_content FROM wp_posts WHERE ID=” Deactivating
   that plugin removes the error 🙂 Thanks hugely for the clue !!! Now to track 
   down the reason for the original post 🙂
 *  Thread Starter [Mark (podz)](https://wordpress.org/support/users/podz/)
 * (@podz)
 * [21 years, 7 months ago](https://wordpress.org/support/topic/cannot-edit-comments/#post-101303)
 * The db error at the top of this thread is caused when the output hits a ‘
    Could
   it be something to do with escaping it ? I’ve looked through some of the edit-
   comments files but I’m at a loss as to where I would find this, if at all….
 *  Thread Starter [Mark (podz)](https://wordpress.org/support/users/podz/)
 * (@podz)
 * [21 years, 7 months ago](https://wordpress.org/support/topic/cannot-edit-comments/#post-101304)
 * Error now gone – I’ve upgraded to the latest cvs 🙂
    Thanks for your help Mark!
 *  [saki](https://wordpress.org/support/users/saki/)
 * (@saki)
 * [21 years, 6 months ago](https://wordpress.org/support/topic/cannot-edit-comments/#post-101376)
 * I’m having the same problem too — the comments with single quotes in them automatically
   have a \ before the ‘ and it would be really tedious to always have to edit my
   comments. Also, when I try to edit something else and not try to fix the \, the
   same database error pops up like the one mentioned previously in this thread.
   
   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 ‘ I’m
   sorry, but I’m not very good with codes so could someone explain this to me? 
   Thank you in advance.
 *  Thread Starter [Mark (podz)](https://wordpress.org/support/users/podz/)
 * (@podz)
 * [21 years, 6 months ago](https://wordpress.org/support/topic/cannot-edit-comments/#post-101377)
 * List the plugins you use ?
 *  [saki](https://wordpress.org/support/users/saki/)
 * (@saki)
 * [21 years, 6 months ago](https://wordpress.org/support/topic/cannot-edit-comments/#post-101378)
 * Well, so far the only plugin that I’ve got activated is the Blacklist plugin…
 *  [saki](https://wordpress.org/support/users/saki/)
 * (@saki)
 * [21 years, 5 months ago](https://wordpress.org/support/topic/cannot-edit-comments/#post-101380)
 * Is it the plugin, then? :/
 *  Thread Starter [Mark (podz)](https://wordpress.org/support/users/podz/)
 * (@podz)
 * [21 years, 5 months ago](https://wordpress.org/support/topic/cannot-edit-comments/#post-101381)
 * I have no experience with that plugin.
    Try running upgrade.php a couple of times.
   If that doesn’t work, you may have to wait until you upgrade – it’s what cleared
   the error for me.
 *  [angelmax](https://wordpress.org/support/users/angelmax/)
 * (@angelmax)
 * [21 years, 5 months ago](https://wordpress.org/support/topic/cannot-edit-comments/#post-101386)
 * emsdc and all, use the fix proposed at:
    [http://wordpress.org/support/3/10795](http://wordpress.org/support/3/10795)
   it worked for me and my 1.2.1 install.

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

The topic ‘Cannot edit comments’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 12 replies
 * 4 participants
 * Last reply from: [angelmax](https://wordpress.org/support/users/angelmax/)
 * Last activity: [21 years, 5 months ago](https://wordpress.org/support/topic/cannot-edit-comments/#post-101386)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
