Re: RE: [PHP] special characters with perl,mysql,php
| From: | Mitchell Hagerty | Date: | Sat, 24 Feb 2001 06:49:01 +0000 |
| Subject: | Re: RE: [PHP] special characters with perl,mysql,php | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-41464@lists.php.net to get a copy of this message | ||
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 :\
tks for your help
mitch
> i use a regexp to slash-out single quotes for
> inclusion into an SQL query:
>
> // quote a value to make it appropriate for inclusion in an SQL string
> function db_quote($value) {
> return ereg_replace("'","\\'",$value);
> }
>
>
>
> > -----Original Message-----
> > From: Mitchell Hagerty [mailto:mitchell_hagerty@und.nodak.edu]
> > Sent: Friday, February 23, 2001 18:54
> > To: php-general@lists.php.net
> > Subject: [PHP] special characters with perl,mysql,php
> >
> >
> > Hey All,
> >
> > What would be a good method for inserting data into a blob field
> > that contained special characters using perl then retrieving that
> > data with php?
> >
> > URI::Escape has worked well with perl but now that php has
> > gotten into the picture I need a new method.
> >
> > any suggestions?
> >
> > tks
> > mitch
> >
> >
> >
> > --
> > 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>
>
> --
> 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
>