|
From: Alexis S. <al...@su...> - 2001-11-10 00:56:27
|
Well, in fact it was not a bug :)))
nut a feature :)
The fact is that when you login the admin section,
the session libray makes an entry in the session table.
So I put 2 consecutive $rqt->getrow() in order not to have the *real* last
login date (which is actually right now) but the time just before.
Anyway, this is just a problem of conception !
If you think this way of processing is better, tell me why, I'm open to
your suggestion !
Anyway, thanks a lot to code for mydynaweb !
I'm really happy to see the team growing and growing again.
enjoy PHP !
Alex.
------------]Explanation on the
code[-----------------------------------------------
> $rqt = new query($DBH);
$sql is a selection of the timestamp of the session lib, "order by desc"
(we have le last one first)
> $rqt->query($DBH, $sql) or send_sql_error($PHP_SELF, $sql, $rqt->error());
> $row = $rqt->getrow();
first fetchrow : the current time
>-$row = $rqt->getrow();
second fetchrow : the just last login time before now.
>
> $LAST_LOGIN_DATE = date("Y-m-d H:i:s", $row[0]);
>
the formated date from the timestamp
|