Jump to content

Pilot Roster Mishap


Austin

Recommended Posts

  • Moderators

If you want your pilots to be in order by their pilot id:

Open PilotData.class.php in core/common and add the following before the last closing bracket:


public function pilots()
{
  $sql = "SELECT * FROM phpvms_pilots ORDER BY pilotid ASC";
  return DB::get_results($sql);
}

Then open "pilots_list.tpl" in core/templates and add the following right after the "foreach()" loop starts:

$allpilots = PilotData::pilots();

This will sort the list by pilot id. In case you want this to be sorted by some other columns, simply change the column name in the following:


$sql = "SELECT * FROM phpvms_pilots ORDER BY pilotid//This is your column name ASC";

Cheers

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