Jump to content

Detailed Fleet mod


RogerB

Recommended Posts

I forget who created this mod, [don't feel like searching] "detailed Fleet info" but, it displays aircraft that are retired, would anyone mind post code to have this mod not show retired aircraft?

did you mean that mod?

http://forum.phpvms.net/topic/1522-fleet-table/

if it is that mod look at the "Where enabled = 1"

$sql = 'SELECT a.*, a.name AS aircraft,

     COUNT(p.pirepid) AS routesflown,
     SUM(p.distance) AS distance,
     SEC_TO_TIME(SUM(p.flighttime*60*60)) AS totaltime,
     AVG(p.distance) AS averagedistance,
     AVG(p.flighttime) as averagetime
     FROM   '.TABLE_PREFIX.'aircraft a
     LEFT OUTER JOIN '.TABLE_PREFIX.'pireps p ON (p.aircraft = a.id)
     WHERE enabled = 1
     GROUP BY a.name';

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...