Re: PEAR::DB 1.6.4 problem with quoteSmart()

From: Date: Wed, 30 Jun 2004 18:05:31 +0000
Subject: Re: PEAR::DB 1.6.4 problem with quoteSmart()
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-13421@lists.php.net to get a copy of this message
Hi Torsten Roehr, you wrote: > Hi, > > I've got a problem with quoteSmart() in PEAR::DB 1.6.4: > > I've got the following query: $query = "SELECT * FROM table WHERE > userName = '" . $db->quoteSmart($user) . "' AND password = '" > . > md5($password) . "'"; > Of course it's easy to solve by not putting quotes around my value in > the query manually. But isn't it the responsibility of the > application/developer to decide if a value should be put between > quotes or not in the query!?! This has nothing to do with escaping > quotes within the value. > > Any ideas on this? Well, note the *smart* in the method name. quoteSmart() should take care of that, so you don't have to care about the quotes. Regards, -- Michael - < mike(@)php.net >

Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc
« previous php.pear.general (#13421) next »