February 26th, 2000, 09:29 PM
Hi, the question here its how can I add hours? Im making a logbook for a virtual airline hobby of mine .
I have a table called reports (flight reports) and I have a field for Flight time (flttime) so the flight hours are in the same field all like
pilot Flight flttime
1001 550 1:30
1002 552 2:30
1001 505 1:30
so I have to select the pilot, so I use something like "select * form fltreports where piltos='$pilots'"
So now Im telling to selct in this case pilot 1001 ok? so now how can I tell php to add 1:30 + 1:30 = and return 3:00 Hrs??
So pilot 1001 has flown 3:00 Hrs
Thanx allot for the help
February 27th, 2000, 02:06 AM
Even though it may seem silly at first, in mysql use seconds(for example 1:30 is 5400) and format it into HOUR:MINUTE for the page and scripts..
then adding and everything else is a piece of cake...