chilemugriento Posted July 5, 2014 Report Share Posted July 5, 2014 Good day Gentlemen. Still working on my VA, Noticed in Pirep table there is a column called source. So added in customfileds table, new item, called "Simulator" with a dropdown menu for: FS9, FSX, Xplane, Prepare3D (this are for registration form) Want to active a table in VA Statistic to show those parameters, total numbers of every Simulator and total numbers of Pirep System Example: SIMULATOR PIREP FS9 (120) FSPASSENGERS (170) FSX (185) FS FLIGHT KEEPER (8) XPLANE (16) FSACARS (14) PREPARE3D (12) XACARS (97) KACARS (16) FSCAPTAIN (3) PILOT REPORT (25) TOTAL (333) TOTAL (333) Table already build, (copy from pilots by country) trying to put the code by myself, with no results. http://www.surair.co...th=06&year=2014 Somebody can help me with this code ? Thank you very much !!!! Best regards. Quote Link to comment Share on other sites More sharing options...
chilemugriento Posted July 14, 2014 Author Report Share Posted July 14, 2014 [sOLVED] Good day, Finally can made script myself http://www.surair.co...p/vStatsCenter/ Here is, hope will be useful for every interested (noticed table prefix, mine is phpvms_1pireps) <table align="center"> <thead> <th colspan="5"><Center>PIREPS Y ACARS<Center></th> <tr> <th><Center><img src="http:/yoursite"><Center>FSPassengers</th> <th><Center><img src="http:/yoursite"><Center>Xacars</th> <th><Center><img src="http:/yoursite"><Center>Kacars</th> <th><Center><img src="http:/yoursite"><Center>FSAcars</th> <th><Center><http:/yoursite"><Center>FSCaptain</th> </tr> </thead> <tbody> <tr> <td align="center"><?php $query="SELECT COUNT(*) as totalfsp FROM `phpvms_1pireps` WHERE `source`='fspax'"; $result=DB::get_results($query); echo $result[0]->totalfsp; ?></td> <td align="center"><?php $query="SELECT COUNT(*) as totalxac FROM `phpvms_1pireps` WHERE `source`='xacars'"; $result=DB::get_results($query); echo $result[0]->totalxac; ?></td> <td align="center"><?php $query="SELECT COUNT(*) as totalkac FROM `phpvms_1pireps` WHERE `source`='kacars'"; $result=DB::get_results($query); echo $result[0]->totalkac; ?></td> <td align="center"><?php $query="SELECT COUNT(*) as totalfsac FROM `phpvms_1pireps` WHERE `source`='fsac'"; $result=DB::get_results($query); echo $result[0]->totalfsac; ?></td> <td align="center"><?php $query="SELECT COUNT(*) as totalfscap FROM `phpvms_1pireps` WHERE `source`='fscap'"; $result=DB::get_results($query); echo $result[0]->totalfscap; ?></td> <td colspan="5"></td> </tbody> </table> <table align="center"> <thead> <th colspan="5"><Center><Center></th> <tr> <th><Center><img src="http:/yoursite"><Center>FS Flight Keeper</th> <th><Center><img src="http:/yoursite"><Center>APVacars</th> <th><Center><img src="http:/yoursite"><Center>CAVacars</th> <th><Center><img src="http:/yoursite"><Center>SUR AIR Report</th> <th><Center><img src="http:/yoursite"><Center>Otros</th> </tr> </thead> <tbody> <tr> <td align="center"><?php $query="SELECT COUNT(*) as totalfsfk FROM `phpvms_1pireps` WHERE `source`='fsfk'"; $result=DB::get_results($query); echo $result[0]->totalfsfk; ?></td> <td align="center"><?php $query="SELECT COUNT(*) as totalapv FROM `phpvms_1pireps` WHERE `source`='apv'"; $result=DB::get_results($query); echo $result[0]->totalapv; ?></td> <td align="center"><?php $query="SELECT COUNT(*) as totalcav FROM `phpvms_1pireps` WHERE `source`='cav'"; $result=DB::get_results($query); echo $result[0]->totalcav; ?></td> <td align="center"><?php $query="SELECT COUNT(*) as totalfpr FROM `phpvms_1pireps` WHERE `source`='fpr'"; $result=DB::get_results($query); echo $result[0]->totalfpr; ?></td> <td align="center"><?php $query="SELECT COUNT(*) as totalotro FROM `phpvms_1pireps` WHERE `source`='otro'"; $result=DB::get_results($query); echo $result[0]->totalotro; ?></td> <td colspan="5"></td> </tbody> </table></p><BR><BR> Best regards Quote Link to comment Share on other sites More sharing options...
Strider Posted July 15, 2014 Report Share Posted July 15, 2014 You would want to add those sql calls to a separate php file such as the statsdata file and call them in the vstats.tpl file. 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.