Daniel Posted February 5, 2011 Report Share Posted February 5, 2011 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> Quote Link to comment Share on other sites More sharing options...
Administrators simpilot Posted February 5, 2011 Administrators Report Share Posted February 5, 2011 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'); Quote Link to comment Share on other sites More sharing options...
Michael Posted February 5, 2011 Report Share Posted February 5, 2011 Daniel, You have yourself a very nice layout! Just thought I'd drop in and say so. Quote Link to comment Share on other sites More sharing options...
Daniel Posted February 6, 2011 Author Report Share Posted February 6, 2011 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 Quote Link to comment Share on other sites More sharing options...
Daniel Posted February 6, 2011 Author Report Share Posted February 6, 2011 Daniel, You have yourself a very nice layout! Just thought I'd drop in and say so. Thank You Quote Link to comment Share on other sites More sharing options...
Daniel Posted February 6, 2011 Author Report Share Posted February 6, 2011 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 Quote Link to comment Share on other sites More sharing options...
Administrators simpilot Posted February 6, 2011 Administrators Report Share Posted February 6, 2011 You are changing the pilots id manually in the database? Quote Link to comment Share on other sites More sharing options...
Daniel Posted February 6, 2011 Author Report Share Posted February 6, 2011 no I am doing it in the Admin Center Quote Link to comment Share on other sites More sharing options...
Administrators simpilot Posted February 6, 2011 Administrators Report Share Posted February 6, 2011 I just tried it on my test install and it works just as intended. Have you tried clearing the cache? Quote Link to comment Share on other sites More sharing options...
Daniel Posted February 6, 2011 Author Report Share Posted February 6, 2011 Yep, I have Optimized tables Cleared Cache Reset Signatures Quote Link to comment Share on other sites More sharing options...
Administrators simpilot Posted February 6, 2011 Administrators Report Share Posted February 6, 2011 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. Quote Link to comment Share on other sites More sharing options...
Daniel Posted February 6, 2011 Author Report Share Posted February 6, 2011 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? Quote Link to comment Share on other sites More sharing options...
Administrators simpilot Posted February 6, 2011 Administrators Report Share Posted February 6, 2011 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. Quote Link to comment Share on other sites More sharing options...
Daniel Posted February 6, 2011 Author Report Share Posted February 6, 2011 Still no luck Quote Link to comment Share on other sites More sharing options...
Daniel Posted February 6, 2011 Author Report Share Posted February 6, 2011 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 Quote Link to comment Share on other sites More sharing options...
Daniel Posted February 6, 2011 Author Report Share Posted February 6, 2011 Ok worked, thanks a lot!!!! 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.