Compare time functions
| From: | wade | Date: | Mon, 30 Sep 2002 22:58:37 +0000 |
| Subject: | Compare time functions | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-22109@lists.php.net to get a copy of this message | ||
Could anyone help me to figure out how to write a piece of code that
says
if the time now time( ) is greater than 1 hour of the time( time stored
in the database) do something.
I have a script that gets the time as of now and I also have the time of
(lets say then) stored in a database.
how would I write the code to say if the old time is greater than 1
hour do
something?
I need to compare the 2 time( ) functions.
$time1 = current server time
$time2 = server time stored in the database
if ($time1 is >= 1 hour of $time2)
{
execute code
}
How would one go about comparing these two time functions?
Thank you
--
Should you have any questions, comments or concerns, feel free to call
me at 318-338-2033.
Thank you for your time,
Wade Kelley, Design Engineer
================================================
Bayou Internet...(888) 30-BAYOU...http://www.bayou.com
Mississippi Internet...(800) MISSISSIPPI...http://www.mississippi.net
Vicksburg Online...(800) MISSISSIPPI...http://www.vicksburg.com
================================================