Jump to content

[SOLVED] Find out if $Time passed since $date.


shlomikalfa

Recommended Posts

hey there i want to know what's the easiest way to do the following.

 

> Collect last update form server [MySql] in format: 2008-05-09 15:52:23

> Collect current time from php in format: date('Y-m-d H:i:s'), Should return same format.

> Check out if it's been 5 minutes since the last update.

 

Purpose: i have a server that holds all sort of variables in different tables, it also has a specific ''ServerDetails'' table to hold all the necessary details together, now i don't want to overload the server

with updating the details at every page watch so i want have a 'LastUpdate' variable which will be checked to see if it has been $X time from the last update then collect the details again...

 

IE:

Table1::
username | pass | something...
Table2::
Actions | ToDo | something....
ServerDetails::
Total users | Total Actions | Total something | last update

 

[move]Thanks for reading and supporting !!!!![/move]

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.