01-13-2008, 05:21 PM
I am working on integrating a Flight Simulator ACAR package which, basically, records how long a pilot has flown. The problem I am having is how to get the total hours a filot has flown to display in the memberlist.
I am trying to add the query in the memberlist.php page, but I'm not sure if that is the proper place.
The original query is
Any help is appreciated as I'm stuck.
I am trying to add the query in the memberlist.php page, but I'm not sure if that is the proper place.
The original query is
PHP Code:
$query_hours = "SELECT sec_to_time(sum(time_to_sec(t2.duration))) AS duration_sum FROM
".TABLE_PREFIX."users t1, reports t2 WHERE t1.uid=$id AND t1.uid=t2.pilot_id";
$result_hours = mysql_query($query_hours);
if (mysql_numrows($result_hours) > 0) {
$time = mysql_result($result_hours,0,"duration_sum");
Any help is appreciated as I'm stuck.