Moderators mark1million Posted October 11, 2011 Moderators Report Share Posted October 11, 2011 Is there a function to show a pilots total miles flown? Quote Link to comment Share on other sites More sharing options...
Guest lorathon Posted October 11, 2011 Report Share Posted October 11, 2011 This should work for you. Or you can add the SUM(distance) AS distance to some other query. $sql = 'SELECT SUM(distance) AS distance FROM '.TABLE_PREFIX.'pireps WHERE `pilotid` = '.$pilotid ; $info = DB::get_row($sql); echo $info->distance; Quote Link to comment Share on other sites More sharing options...
Moderators mark1million Posted October 11, 2011 Author Moderators Report Share Posted October 11, 2011 Cheers Jeff, Had to use $userinfo->pilotid works great Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.