ok heres my situation, i have a table showing on my site that list a members info, and another table that lists there Flights, each flights has a a field called "Hours" which is the length of the flight in minutes, each pilot can have multiple flights to their name.
what i need on this table is to have it add all the "Hours" up from all the flights and show it in one box.
e.g
Pilot a:
Flight No | Hours |
| 0001 | 60 |
| 0002 | 60 |
table:
| Pilot | Hours |
| A | 120 |
so bassicaly how do i get this query:
$ac = "SELECT * FROM $table3 WHERE PilotID = '$temp1'";
$ca = mysql_query($ac)or die(mysql_error());
while ($row = mysql_fetch_array($ca))
{
$temp3 = $row['Hours'];
}
to add each row together as its pulled from the database?