Re: Auth question

From: Date: Tue, 23 Jul 2002 14:17:14 +0000
Subject: Re: Auth question
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-7918@lists.php.net to get a copy of this message
On Tue, 23 Jul 2002 16:05:30 +0200 Bertrand Mansion <bmansion@mamasam.com> wrote: > Martin, > > 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... > > I am using the work you've done for Auth to put it in Config_Container_db > because it's more advanced than the actual code. Hope you don't mind. The last %s in () and VALUES() will be replaced respectivly by $additional_key and $additional_value. $additional_value contains additionnals data stored in the user record (permission by example ;) ). $addition_xxx has been defined by if (is_array($additional)) { foreach ($additional as $key => $value) { $additional_key .= ", " . $key; $additional_value .= ", '" . $value . "'"; } } $additional is the third optional param. hth pa

« previous php.pear.dev (#7918) next »