Strider Posted February 6, 2013 Report Share Posted February 6, 2013 I would like to know, what code would I need to get the percentage of flights done with each recording tool, like kacars,fspax,xacars and manual. The out come would be something like: 80% mACARS 55%xacars 60% fspax 30% manual Those figures are not accurate in the slightest, just used them to illustrate my point. I do not want this to look at just the current months pirep count, but the entire pirep count for the VA Quote Link to comment Share on other sites More sharing options...
mischka Posted February 6, 2013 Report Share Posted February 6, 2013 Depends on what you want to do with it... just a list? If its a one-off you can just go to your phpmyadmin and enter the following query: SELECT source, count(*) as amount, (count(*)/(select count(*) from `phpvms_pireps`)) *100 as percentage FROM `phpvms_pireps` group by source that'll give you a list of amounts and percentages for each "method" of filing a pirep, including manual ones. if you only want acars you'd just have to add --- where source<>"manual" --- or something Quote Link to comment Share on other sites More sharing options...
Strider Posted February 6, 2013 Author Report Share Posted February 6, 2013 I want to show it on the site, not get it by phpmyadmin, as I dont want to be having to be manually updating the list. Quote Link to comment Share on other sites More sharing options...
mischka Posted February 6, 2013 Report Share Posted February 6, 2013 so just use the query to generate the list, should be 5 minutes work Quote Link to comment Share on other sites More sharing options...
Strider Posted February 7, 2013 Author Report Share Posted February 7, 2013 I found what I am looking for, that simpilot made for his VA. 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.