Re: Special characters --> single quote
| From: | Jason Brooke | Date: | Tue, 22 Aug 2000 14:30:22 +0000 |
| Subject: | Re: Special characters --> single quote | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-12946@lists.php.net to get a copy of this message | ||
> I can't do this because an other application in Delphi makes access on this
> database,
> so I need that the data be without slashes.
>
> I see that there is no solution for my problem.
then how about replacing all occurances of a single quote inside $OBSERVATION, with two single
quotes. This will leave the data in the OBESEVATION field free of backslashes for your Delphi
application.
$query = "UPDATE toto SET OBSERVATION = '".str_replace("'",
"''", $OBSERVATION)."' WHERE id =
$number";
jason