[Solved] Pilot Roster

Hey,

Just noticed that I had edited something on our roster and a pilot registered PAV079 Chris Odyssey and he is not in order… any ideas?

http://www.pashairvirtual.co.uk/index.php/Listing

the part I had edited

<td><?php
$fieldvalue = PilotData::GetFieldValue($pilot->pilotid, 'VATSIM ID');
if($fieldvalue != '1')
{
  echo '<a href="http://www.vataware.com/pilot.cfm?cid='.$fieldvalue.'" target="_blank"><center><img src="'.SITE_URL.'/images/vatsim.gif" alt="Vatsim ID" /></center></a>';
}
else
{
echo '<center><img src="/images/novat.png" width="20" height="18" border="0"/></center></a>';
}
?>
<?php
}
?>
</td>

It is how the data is coming back from the database. You have probably deleted a pilot along the way and the datbase has repopulated that field with another line of data which puts it out of line. You can set how you want your pilots sorted in the local.config.php file.

/* For PILOTS_ORDER_BY use p.[column_name] [ASC/DESC] */
Config::Set('PILOTS_ORDER_BY', 'p.pilotid DESC');

Daniel,

You have yourself a very nice layout! Just thought I’d drop in and say so.

It is how the data is coming back from the database. You have probably deleted a pilot along the way and the datbase has repopulated that field with another line of data which puts it out of line. You can set how you want your pilots sorted in the local.config.php file.

/* For PILOTS_ORDER_BY use p.[column_name] [ASC/DESC] */
Config::Set(‘PILOTS_ORDER_BY’, ‘p.pilotid DESC’);

Thanks a lot sim pilot

Daniel,

You have yourself a very nice layout! Just thought I’d drop in and say so.

Thank You

SimPilot I had added that bit to the local.config and then optimized tables but still no luck.. also I had to change a pilot Id because he became staff and his pilot Id is PAV009 and it half way down the roster.

Thanks

You are changing the pilots id manually in the database?

no I am doing it in the Admin Center

I just tried it on my test install and it works just as intended. Have you tried clearing the cache?

Yep, I have

  • Optimized tables
  • Cleared Cache
  • Reset Signatures

You must have a mis-spell somewhere or something, I have it set up the same axcat way and it is working. Double check the additional config lines and make sure it is not in your file twice and overriding itself.

do you think it could be something in the pilotlist.tpl or the Module ‘Listing’? or is it something to do with the local.config?

Without the files i have no idea.

The other thing you could do that would probably fix it is go into phpMyAdmin and go under the operations tab for the pilots table. Use the alter table order by: function and set it to pilotid ascending.

Still no luck

Without the files i have no idea.

The other thing you could do that would probably fix it is go into phpMyAdmin and go under the operations tab for the pilots table. Use the alter table order by: function and set it to pilotid ascending.

Ok, I’l try that now

Ok worked, thanks a lot!!!