1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2000
    Mexico DF Mexico
    Rep Power
    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
    and on

    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
  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2000
    Rep Power
    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...

Similar Threads

  1. Replies: 1
    Last Post: February 6th, 2004, 05:53 AM
  2. Inserting from form to multiple tables
    By barth in forum MySQL Help
    Replies: 0
    Last Post: January 25th, 2004, 09:27 AM
  3. put variable in text field
    By alexmasters in forum PHP Development
    Replies: 3
    Last Post: January 14th, 2004, 07:32 PM
  4. cgi.pm module not compatible with multipart enctype syntax
    By Suzette in forum Perl Programming
    Replies: 2
    Last Post: December 22nd, 2003, 11:19 AM
  5. return value from 3 fields into 1 field
    By denali in forum MS SQL Development
    Replies: 1
    Last Post: December 19th, 2003, 07:44 AM

IMN logo majestic logo threadwatch logo seochat tools logo