Title: Database Error when comment contains apostrophe &#8216;
Last modified: August 18, 2016

---

# Database Error when comment contains apostrophe ‘

 *  [Ajay](https://wordpress.org/support/users/ajay/)
 * (@ajay)
 * [20 years, 11 months ago](https://wordpress.org/support/topic/database-error-when-comment-contains-apostrophe/)
 * with reference to [http://wordpress.org/support/topic/32096](http://wordpress.org/support/topic/32096)
 * I figured out that whenever the comment has an apostrophe (‘), then it causes
   a database error.
 * How do I solve this problem?

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

 *  [MichaelH](https://wordpress.org/support/users/michaelh/)
 * (@michaelh)
 * [20 years, 11 months ago](https://wordpress.org/support/topic/database-error-when-comment-contains-apostrophe/#post-217865)
 * I orginally started to ask if one of your plugins was causing this but maybe 
   it’s related to this:
 * [Header already sent error at Codex](http://codex.wordpress.org/User:MichaelH/FAQ_Troubleshooting#How_do_I_solve_the_Headers_already_sent_warning_problem.3F)
 *  Thread Starter [Ajay](https://wordpress.org/support/users/ajay/)
 * (@ajay)
 * [20 years, 11 months ago](https://wordpress.org/support/topic/database-error-when-comment-contains-apostrophe/#post-218006)
 * That was the first thing I tried that.
 * None of the files have extra spaces.
 *  Thread Starter [Ajay](https://wordpress.org/support/users/ajay/)
 * (@ajay)
 * [20 years, 11 months ago](https://wordpress.org/support/topic/database-error-when-comment-contains-apostrophe/#post-218133)
 * Any solution to this problem?
 * Is there some way to process the comment content to check if there are apostrophe?
 * Would the escape function of php do it?
 * Could this problem be because of Spam Karma 2?
 *  [Cypher](https://wordpress.org/support/users/cypher/)
 * (@cypher)
 * [20 years, 11 months ago](https://wordpress.org/support/topic/database-error-when-comment-contains-apostrophe/#post-218139)
 * I don’t believe SK2 has anything to do with it. I have comments on my site which
   have apostrophe in them and I don’t have the same problem.
 * Is it possibly a server config issue or PHP config issue?
 * Regards
 *  [Mark (podz)](https://wordpress.org/support/users/podz/)
 * (@podz)
 * [20 years, 11 months ago](https://wordpress.org/support/topic/database-error-when-comment-contains-apostrophe/#post-218143)
 * What plugins are you using ?
 *  Thread Starter [Ajay](https://wordpress.org/support/users/ajay/)
 * (@ajay)
 * [20 years, 11 months ago](https://wordpress.org/support/topic/database-error-when-comment-contains-apostrophe/#post-218295)
 * I wouldnt know about server config or PHP config.
 * What about magic quotes or something?
 * And podz, the plugins that directly apply to the postpage are:
 * Text Control
    Subscribe To Comments SK2 Unfancy Quote No Duplicate Comments Live
   Comment Preview Gravatar Signup Comment Quicktags
 * Could it be one of these?
 *  Thread Starter [Ajay](https://wordpress.org/support/users/ajay/)
 * (@ajay)
 * [20 years, 11 months ago](https://wordpress.org/support/topic/database-error-when-comment-contains-apostrophe/#post-218436)
 * Please help.
 * Is there some way for me to remove / escape or add a \ in front of apostrphes
   in my comment form?
 *  [Minna](https://wordpress.org/support/users/minna/)
 * (@minna)
 * [20 years, 11 months ago](https://wordpress.org/support/topic/database-error-when-comment-contains-apostrophe/#post-218438)
 * I got the database error with No Duplicate Comments plugin; I told the plugin
   author and I think the newest version has corrected the problem. What version
   do you have? It should be v0.9.2
 *  Thread Starter [Ajay](https://wordpress.org/support/users/ajay/)
 * (@ajay)
 * [20 years, 11 months ago](https://wordpress.org/support/topic/database-error-when-comment-contains-apostrophe/#post-218441)
 * Thanks 🙂
 * I had 0.9
    Now got it updated.
 * I guess, I lapsed on checking for update of all the plugins!
 * Problems seems to have gone for now…. Hopefully, it doesnt return

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

The topic ‘Database Error when comment contains apostrophe ‘’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 9 replies
 * 5 participants
 * Last reply from: [Ajay](https://wordpress.org/support/users/ajay/)
 * Last activity: [20 years, 11 months ago](https://wordpress.org/support/topic/database-error-when-comment-contains-apostrophe/#post-218441)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
