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.


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.

*********   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 (
To unsubscribe, visit:

Reply via email to