Re: Re: SQL woes (newbie question) - PHP 4.3.6 & ADOdb
| From: | Tom Rogers | Date: | Wed, 28 Apr 2004 14:31:39 +0000 |
| Subject: | Re: Re: SQL woes (newbie question) - PHP 4.3.6 & ADOdb | ||
| References: | 1 2 3 4 5 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-184879@lists.php.net to get a copy of this message | ||
Hi,
Thursday, April 29, 2004, 12:16:14 AM, you wrote:
>>>>>Thanks!
>>>>>
>>>>>Gabe
>>>
>>>Thanks for the link, looks like that will do the trick. But I was also
>>>wondering then, when I use a SELECT statement to retrieve the same data
>>>and display it, is there a function that will remove all the escape
>>>characters? I didn't see anything in the mysql function list.
>>
>>
>> This should do the trick:
>> http://de3.php.net/manual/en/function.stripslashes.php
>>
>> Regards, Torsten
G> Hi Torsten,
G> I tried using that function this morning like you suggested, but when I
G> ran it I suddenly realized that I'm running an Access db not a mysql db.
G> The function asks for a resource connection to a mysql db. Is there a
G> similar function that you know of that will do the same thing for an
G> access query? Many thanks!
G> Gabe
The escape is probably to use 2 single quotes so you can do this:
$text = str_replace("'","''",$text)
before the insert. There is no need to un-escape as the info in the db
will just be the single quote.
--
regards,
Tom