Re: Newbie PHP/MySQL Question

From: Date: Thu, 06 Dec 2001 19:28:38 +0000
Subject: Re: Newbie PHP/MySQL Question
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-76927@lists.php.net to get a copy of this message
Think i figured out my problem...next time i will RTFM!!! Sorry! "Peter Van Der Maas" <none@than.you> wrote in message news:20011206183252.66848.qmail@pb1.pair.com... > 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 > > >

« previous php.general (#76927) next »