Daniel Posted February 5, 2011 Report 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
Administrators simpilot Posted February 5, 2011 Administrators Report 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
Michael Posted February 5, 2011 Report Posted February 5, 2011 Daniel, You have yourself a very nice layout! Just thought I'd drop in and say so. Quote
Daniel Posted February 6, 2011 Author Report 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
Daniel Posted February 6, 2011 Author Report Posted February 6, 2011 Daniel, You have yourself a very nice layout! Just thought I'd drop in and say so. Thank You Quote
Daniel Posted February 6, 2011 Author Report 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
Administrators simpilot Posted February 6, 2011 Administrators Report Posted February 6, 2011 You are changing the pilots id manually in the database? Quote
Daniel Posted February 6, 2011 Author Report Posted February 6, 2011 no I am doing it in the Admin Center Quote
Administrators simpilot Posted February 6, 2011 Administrators Report 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
Daniel Posted February 6, 2011 Author Report Posted February 6, 2011 Yep, I have Optimized tables Cleared Cache Reset Signatures Quote
Administrators simpilot Posted February 6, 2011 Administrators Report 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
Daniel Posted February 6, 2011 Author Report 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
Administrators simpilot Posted February 6, 2011 Administrators Report 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
Daniel Posted February 6, 2011 Author Report 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
Daniel Posted February 6, 2011 Author Report Posted February 6, 2011 Ok worked, thanks a lot!!!! Quote
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.