Filter the data $data = str_replace("'", "", $data); I am sure there are many ways to filter the data before insert. (If you are SURE you have "A.D.D." then it wont matter what I say to you.) Rick B. On Feb 18, 2008 11:24 PM, Shawn McKenzie <nospam@xxxxxxxxxxxxx> wrote: > nihilism machine wrote: > > I have a user saving a VARCHAR(255) field in a mysql db which has single > > quotes in the text, how can i replace them so that they dont fuck up my > > mysql command? > > > > -e > > > Have you tried: dont_fuck_up_my_mysql_command() That has thrown E_DEPRECATED since PHP 4.1. RTFM, n00b. ;-D -- </Dan> Daniel P. Brown Senior Unix Geek <? while(1) { $me = $mind--; sleep(86400); } ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php