RE: [PHP] select based on time/date

From: Date: Wed, 26 Sep 2001 18:05:53 +0000
Subject: RE: [PHP] select based on time/date
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-68903@lists.php.net to get a copy of this message
Awesome... Its all working perfectly now! Makes perfect sense why the update is like that. thanks again! __________________ Jason Dulberg Extreme MTB http://extreme.nas.net > -----Original Message----- > From: Sheridan Saint-Michel [mailto:webmaster@foxjet.com] > Sent: September 26, 2001 1:59 PM > To: Jason Dulberg; php-general@lists.php.net > Subject: Re: [PHP] select based on time/date > > > Timestamp only sets itself to Now() if it isn't explicitly set (or set to > NULL). So try this: > > $out = "UPDATE logged_in SET session='',time_in=time_in WHERE > (logged_in.userid='$aid') AND (logged_in.session='$sessid')"; > > Sheridan Saint-Michel > Website Administrator > FoxJet, an ITW Company > www.foxjet.com > > > ----- Original Message ----- > From: "Jason Dulberg" <jdulberg@nas.net> > To: "Sheridan Saint-Michel" <webmaster@foxjet.com>; > <php-general@lists.php.net> > Sent: Wednesday, September 26, 2001 12:44 PM > Subject: RE: [PHP] select based on time/date > > > > You were right! I changed it to a timestamp (14) and the selection is > > working great now. > > > > Only problem is that when I logout which UPDATE's the table to clear the > > $session field, the $time_in timestamp gets updated because of the NOW() > > function. I need that date to stay the same when someone logs out. > > > > current logout.php: > > $out = "UPDATE logged_in SET session='' WHERE > > (logged_in.userid='$aid') > AND > > (logged_in.session='$sessid')"; > > > > Is there a way to only allow the NOW() to work when a row is > added to the > > table? Or perhaps another way.... > > > > Thank you again for your time. I've learned alot from this. > > > > __________________ > > Jason Dulberg > > Extreme MTB > > http://extreme.nas.net

« previous php.general (#68903) next »