Re: Auth question
| From: | Martin Jansen | Date: | Wed, 24 Jul 2002 07:09:13 +0000 |
| Subject: | Re: Auth question | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-7930@lists.php.net to get a copy of this message | ||
On Tue Jul 23, 2002 at 04:0530PM +0200, Bertrand Mansion wrote:
> Is this line normal in Auth::addUser()
>
> $query = sprintf("INSERT INTO %s (%s, %s%s) VALUES ('%s',
> '%s'%s)",
>
> I have the feeling there are some commas and quotes missing...
No, the values for the last %s are generated dynamically some lines
before the sprintf() call.
BTW: When using the code in Config, you should consider dropping
sprintf() and making use of DB::prepare() & DB::execute() , since then
all quoting and the like will be handled automatically.
- martin
--
Martin Jansen - mail@martin-jansen.de
http://martinjansen.com/