mysql - Timediff of same field having same id -


supposed have fields below:

id   fromstatus    time                   tostatus 1    ready         2016-08-05 08:36:27    break 1    break         2016-08-05 08:36:37    ready 1    ready         2016-08-05 08:40:27    break 1    break         2016-08-05 08:40:37    ready 

how can total time difference between break status ready status output should be

id   totalbreaktime 1    00:00:20 


Comments

Popular posts from this blog

PHP while loop dynamic rowspan -

timer - Java TimerTask cancel -

android - How to read a column value in parse.com without accessing an object or a pointer -