Re: ' and " in sql query

From: Date: Fri, 04 Jan 2002 17:42:07 +0000
Subject: Re: ' and " in sql query
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-79476@lists.php.net to get a copy of this message
addslashes() would work... or use an ereg_replace to do it. Provided that you only use single quotes in your SQL (which is a good idea anyway since other db's only allow you to use single quotes) then you only have a problem with single quotes and not double quotes. On Thu, 3 Jan 2002, Daniel Harik wrote: > Hello > > Guys how can escape chars like ' and " so that MySQL doesn't report me > errors all the time, for example when i try to add data like "It's", i > always have errors > > Thank You > > > > -- > Best regards, > Daniel mailto:gatop@hot.ee > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#79476) next »