Time difference desired load

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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…

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux