Time difference desired load
| From: | admin at buskirkgraphics dot com | Date: | Mon, 20 Apr 2009 17:38:00 +0000 |
| Subject: | Time difference desired load | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-291701@lists.php.net to get a copy of this message | ||
Suggestion on faster solutions for extremely large database.
$ledip['started'] = '2009-04-01 13:40:34'; Example time in DB
$ledip['touchedlast'] = '2009-04-01 13:41:28'; Example time in DB
date('i:s', strtotime($ledip['touchedlast']) -
strtotime($ledip['started'])); // Not a desired solution because of its inability to go
past the minute correctly I AM AWARE.
or
concat( truncate( hour( timediff($ledip['touchedlast'],$ledip['started']) ) /24,
0 ) , " days ", hour(
timediff($ledip['touchedlast'],$ledip['started']) ) %24, " hours ",
minute( timediff($ledip['touchedlast'],$ledip['started'] ) ) , " minutes
", second( timediff($ledip['touchedlast'],$ledip['started'] ) ) , "
seconds" ) as timeleft
The results of concat truncate, allows me the flexibility or exacting time differences out past the
minute. I am worried that the vastness of the database may cause me a server load or query
timeframes that are undesirable as it grows even bigger.
Suggestions?
********* PLEASE ....
Do not reply to this email with your 9 million page thought of how to, or some custom function that
you think is all that, I do not care.
I am asking for load desired results NOT your take on my code…