Jump to content

Code for Hub Rosters


EastCoastHops

Recommended Posts

  • 1 month later...

Firstly, I noticed you've changed the thread title. Rosters are already displayed by default when you go to index.php/pilots.

If you want it for just one hub then:

<tr>
<th>Pilot code</th>
<th>First name</th>
<th>Last name</th>
<th>Country</th>
<th>Total Hours</th>
<th>Total Flights</th>
</tr>

<?php
$params['p.hub'] = 'CYYZ';
$pilots = PilotData::findPilots($params);
foreach($pilots as $pilot){
?>

<tr>
<td><?php echo $pilot->code.$pilot->pilotid;?></td>
<td><?php echo $pilot->firstname;?></td>
<td><?php echo $pilot->lastname;?></td>
<td><?php echo $pilot->country;?></td>
<td><?php echo $pilot->totalhours;?></td>
<td><?php echo $pilot->totalflights;?></td>
</tr>
<?php
}
?>

That will display all your pilots based in Toronto and some of their details.

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...