Re: inserting ´ in a db
| From: | Larry Garfield | Date: | Thu, 04 Oct 2007 05:29:25 +0000 |
| Subject: | Re: inserting ´ in a db | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-262738@lists.php.net to get a copy of this message | ||
On Wednesday 03 October 2007, Tom Swiss wrote:
> dmagick@gmail.com (Chris) writes:
> > > Everting works fine, except when I try to insert a text that includes a
> > > simple quote.
> >
> > http://www.php.net/mysql_real_escape_string
>
> I'll see you that and raise you PEAR's database interfaces:
>
> http://pear.php.net/package/DB - especially
> DB_common::quoteSmart()
>
> or the more modern
>
> http://pear.php.net/package/MDB2
>
> I'm still partial to DB but suppose I will eventually have to move
> to MDB2.
And I'll raise you native prepared statements with a unified, C-based
interface:
http://www.php.net/pdo
--
Larry Garfield AIM: LOLG42
larry@garfieldtech.com ICQ: 6817012
"If nature has made any one thing less susceptible than all others of
exclusive property, it is the action of the thinking power called an idea,
which an individual may exclusively possess as long as he keeps it to
himself; but the moment it is divulged, it forces itself into the possession
of every one, and the receiver cannot dispossess himself of it." -- Thomas
Jefferson