Re: RE: [PHP] special characters with perl,mysql,php
| From: | Christian Reiniger | Date: | Sat, 24 Feb 2001 15:14:33 +0000 |
| Subject: | Re: RE: [PHP] special characters with perl,mysql,php | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-41483@lists.php.net to get a copy of this message | ||
On Saturday 24 February 2001 07:49, Mitchell Hagerty wrote:
> The special character I'm concerned with at the moment is the back tick
> ` which mysql doesn't like on an insert. I was looking for a way not to
> parse the entire file evertime I inserted or extracted them from the
> database. Its simple enough todo in perl and php just seems like it
> would burn alot of cpu time.
>
> I was actually hoping mysql would have a way to encode it on the way in
> and decode on the way out. That way php or perl would be irrelevant.
> Guess not :\
Well, as someone else already said, addslashes () is the tool of choice
for the way in, and for he way out you don't need to do anything.
--
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)
"The number of Unix installations has grown to 10, with more expected."
-- The Unix Programmer's Manual, 2nd Edition, June 1972