This topic is locked

Hours Count

10/11/2007 9:18:38 AM
PHPRunner General questions
B
barbary author

Hi all,

I'm making a table that has 2 fields (from and estimated)

I want a way to tell the difference between the 2 fields

for example:

from is now() ... 2007-10-10 15:16:00

estimated is 2007-10-10 22:00:00
I want the remaining field to display 07:16:00
how can I subtract

I have fields (From, EstimatedTime)
Regards,

Mahmoud

Alexey admin 10/11/2007

Mahmoud,
use TIMEDIFF function in your SQL query.

I.e.

select

...

timediff(estimated,now()) as diff,

...


You can find more info on MySQL functions and syntax here:

http://dev.mysql.com/doc/refman/5.0/en/dat...-functions.html

B
barbary author 10/11/2007

Thanks Alexy for your fast reply

but, I'm a newbie in PHP, so please give me more details

in which page shall I add this code

and how
I'm so sorry, but my knowledge isn't much
Regards,

Mahmoud

Alexey admin 10/11/2007

Mahmoud,
insert the code on the Edit SQL query tab in PHPRunner.

Contact support team directly by support@xlinesoft.com if you experience difficulties with that.

B
barbary author 10/11/2007

I got an error and sent it to you