Re: Apostrophes/SQL Statements

From: Date: Mon, 15 May 2000 09:51:21 +0000
Subject: Re: Apostrophes/SQL Statements
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-56@lists.php.net to get a copy of this message
Emile Axelrad wrote: > I'm getting problems with my SQL Statements where the data has apostrophes > [single quotes]. It messes up the insertion procedure - what should I do? > How do I get rid of the single quotes from a string? > > Cheers for your help! I know its an easy question but I can't find the > proper thing to do on it... > > - Emile Axelrad > > -- > 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 Maybe this example will help you : print '<PARAM NAME="text1" VALUE="' . $ime . '">'; or this one $stmt = OCIParse($c,"select * from imenik where PRIIMEK='$priimek'"); Note that the single quotas are in the double quotas. AnD.

« previous php.general (#56) next »