You can use addslashes and stripslashes when inserting and selecting respectively. addslashes will turn your name into O\'connel. and stripslashes will bring it back to the displayable format.
check out php.net/addslashes php.net/stripslashes hth Jeff Steve Buehler <[EMAIL PROTECTED]> To: PHP <[EMAIL PROTECTED]>, mysql <[EMAIL PROTECTED]> cc: 11/07/2003 11:30 Subject: single quotes in database AM I am using PHP/MySQL and am having a problem. We have some names and addresses in the database that have single quotes in them. For instance. There is a town around here called "Lee's Summit". Also names like "O'connel". When I pull from the database it skips these because of the quotes. I know there is something that I have seen before about this, but can't find it now. Can anybody help me? I really hope this makes since because I am sick today and am having a hard time thinking straight. Is it something that I will have to fix when putting things into the database? I am hoping on being able to fix this when going in and when coming out of the database so that I don't have to go back and redo all the ones that are already in the database. Thanks Steve -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php