Re: Re: SQL woes (newbie question) - PHP 4.3.6 & ADOdb
| From: | John W. Holmes | Date: | Tue, 27 Apr 2004 20:14:27 +0000 |
| Subject: | Re: Re: SQL woes (newbie question) - PHP 4.3.6 & ADOdb | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-184804@lists.php.net to get a copy of this message | ||
From: "Gabe" <ydnahg-news4432@mailblocks.com>
> 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.
You don't need to remove the escape characters when retrieving data; they
are just there to get your data into the database properly. When you insert
"it\'s okay", the \ just tells the database to take the single quote as a
literal. So "it's okay" is saved in the database and returned when you
retrieve the data.
If you see data _inside_ your database with escape characters, then you're
escaping your data twice. If you don't see escape characters in the
database, but see them when you pull values out, then you may have
magic_quotes_runtime enabled (but it's not on by default).
---John Holmes...