kbohme Posted January 3, 2011 Report Posted January 3, 2011 I am trying to get the total number of awards for a pilot. How can I count the awards of a specific pilot? I am looking to rank pilots based on the number of awards that they have. The awards have a separate table for those awarded and I cant figure out how to count them based on the pilot number field. Any help you can give would be appreciated. Quote
Administrators simpilot Posted January 4, 2011 Administrators Report Posted January 4, 2011 You can use the native awards data function for indivdual pilots and add the count command -> echo count(AwardsData::GetPilotAwards($pilotid)); You will have to set the $pilotid to whatever variable you have available for the pilot id in the template you are working in. For example, in the pilot_public_profile.tpl it would need to be -> echo count(AwardsData::GetPilotAwards($userinfo->pilotid)); Quote
kbohme Posted January 8, 2011 Author Report Posted January 8, 2011 thanks I will give that a try ! 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.