kbohme Posted January 3, 2011 Report Share 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 Link to comment Share on other sites More sharing options...
Administrators simpilot Posted January 4, 2011 Administrators Report Share 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 Link to comment Share on other sites More sharing options...
kbohme Posted January 8, 2011 Author Report Share Posted January 8, 2011 thanks I will give that a try ! 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.