Re: [PHP-GENERAL] Apostrophes/SQL Statements

[email protected] (Andrej Trobentar)
Newsgroups php.general
Organization Rikom d.o.o.
Message-ID <[email protected]>
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: [email protected]
> For additional commands, e-mail: [email protected]
> To contact the list administrators, e-mail: [email protected]

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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.