Need help with addslashes

The $summary field has the following text in it:

“Purification for pet’s allergies”

When I click the approve button, it’s supposed to update the summary column with this text, but I end up getting this 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 ‘s allergies’) and notify = ‘Yes’ order b’ at line 1

In my php code, right before the code to update the database I have:

$summary = addslashes($summary);

Can someone tell me why this is still not working?

Thanks!!

Try to echo result of addslashes($summary) and see if slash has been added.
Also it’s recommended to use mysql_real_escape_string() instead of addshashes
http://us.php.net/manual/en/function.mysql-real-escape-string.php

I normally use mysql_real_escape_string(), addslashes sometimes gives a real headache with double quote