Re: PEAR::DB 1.6.4 problem with quoteSmart()
| From: | Aidan Lister | Date: | Thu, 24 Jun 2004 05:31:28 +0000 |
| Subject: | Re: PEAR::DB 1.6.4 problem with quoteSmart() | ||
| References: | 1 2 3 4 5 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-13428@lists.php.net to get a copy of this message | ||
Hi Torsten,
On a side note, a good way of writing your queries is using sprintf();
$query = sprintf("select * from %s", quotesmart($database));
This removes the PHP from the queries making them much more portable and
less obfuscated.
"Torsten Roehr" <roehr@zilleon.com> wrote in message
news:20040630184535.62320.qmail@pb1.pair.com...
> "Stephan Schmidt" <schst@php.net> wrote in message
> news:40E305DA.2020409@php.net...
> > Hi,
> >
> > Torsten Roehr wrote:
> >
> > > Thanks, Michael. Now I see what the 'smart' stands for... Have to
adapt
> all
> > > my SQL statements now.
> >
> > If you do not want DB to place quotes around your values, you may also
> > use escapeSimple().
> >
>
http://pear.php.net/manual/en/package.database.db.db-common.escapesimple.php
> >
> > Stephan
>
> Thanks, Stephan! Could have seen this myself, arrrgh...
>
> Torsten