Re: comparing timestamps

From: Date: Sun, 20 Jun 2004 22:48:29 +0000
Subject: Re: comparing timestamps
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-188705@lists.php.net to get a copy of this message
Well, Since the current timestamt is now, and 5 minutes equals 60seconds * 5 minutes = 300, this would give you your range as : $range = time() - 300; If you are working with time() in your database your select would be something like : select * from table where timestamp >= $range -- -- Kim Steinhaug ---------------------------------------------------------------------- There are 10 types of people when it comes to binary numbers: those who understand them, and those who don't. ---------------------------------------------------------------------- www.steinhaug.com - www.easywebshop.no - www.webkitpro.com ---------------------------------------------------------------------- "Chris Mach" <cjmach@gto.net> wrote in message news:20040620222623.65589.qmail@pb1.pair.com... I want to compare a timestamp in my database with the current time. I want to be able to tell if the timestamp is within 5 mins of the current time. How would I do this? Please? --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.708 / Virus Database: 464 - Release Date: 18-Jun-2004

« previous php.general (#188705) next »