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" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] 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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php