Re: Re: cvs: pear /Auth Auth.php Container.php /Auth/Container DB.php
| From: | Stig S. Bakken | Date: | Sun, 15 Jul 2001 11:14:48 +0000 |
| Subject: | Re: Re: cvs: pear /Auth Auth.php Container.php /Auth/Container DB.php | ||
| References: | 1 2 | Groups: | php.pear.cvs |
| Request: | Send a blank email to pear-cvs+get-276@lists.php.net to get a copy of this message | ||
nloboek@e35203.upc-e.chello.nl wrote:
>
> In article <cvsmj994883731@cvsserver>, Martin Jansen wrote:
> >--mj994883731
> >Content-Type: text/plain
>
> >class Auth_Container_DB extends Auth_Container
>
> ............
>
> >
> > $query = sprintf("SELECT * FROM %s WHERE %s = '%s'",
> > $this->table,
> > $this->username_col,
> > $username
> > );
>
> Hi Martin,
>
> Just a small suggestion. It might be handy to select a unix timestamp
> which you can check against the idle time of the user. Something like:
>
> $query = "SELECT UNIX_TIMESTAMP(now()) - UNIX_TIMESTAMP(idle)
> AS current FROM ....
>
> It will allow a person to check against a system wide idle time or a
> 'per user' based idle time. The unix timestamp works in both mysql and
> in postgres. I'm not sure about other dbservers.
It's a bad idea to use functions that are supported in only one or two
dbms'es. It undermines the whole idea of having an abstraction layer.
It also shows that we do need a query parsing layer in DB, so we can
support this later.
- Stig