Newbie PHP/MySQL Question
| From: | Peter van der Maas | Date: | Thu, 06 Dec 2001 18:32:52 +0000 |
| Subject: | Newbie PHP/MySQL Question | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-76922@lists.php.net to get a copy of this message | ||
Ok, Im' pretty new at this, but I can't see what may be wrong here:
Table IMT
---------------------
User (char)
SessionID (char)
StartTime(TIMESTAMP)
EndTime(TIMESTAMP)
Code on first page:
INSERT INTO IMT VALUES ('testuser', '$id', CURRENT_TIMESTAMP, '/0');
Code on second page:
UPDATE IMT SET EndTime=NOW() WHERE SessionID='$id';
The problem I am having is that when the second page is executed, it places
the current time in both StartTime and EndTime. However, while I am viewing
the contents throught the process, the StartTime value is correct until the
second page is executed, and then whatever is placed into EndTime shows up
in StartTime. If it matters, the only session variable i'm using is
session_id().
TIA
Pete van der Maas