Jump to content

statistics help [SOLVED]


airmermaid

Recommended Posts

And the code I used was what was pasted above minus the tt parts. Obviously I had to change them to fit the needs of my site.

<tt> Total Pax Carried: </tt><?php
$query="SELECT SUM(`load`) as totalpax FROM `phpvms_pireps` WHERE `flighttype`='P'";
$result=DB::get_results($query);
echo $result[0]->totalpax; ?> <?php echo Persons; ?><br />
<tt>Total Cargo Carried: </tt><?php
$query="SELECT SUM(`load`) as totalfreight FROM `phpvms_pireps` WHERE `flighttype`='C'";
$result=DB::get_results($query);
echo $result[0]->totalfreight; ?> <?php echo Kgs; ?><br /></div>

Or should I have used the entire bit of code that was posted instead of just what I needed?

I went back again this morn and grabbed a csv file and verified the cargo flights types and I looked in the database too as well as verified each flight through the schedules. I am positive they are marked as cargo and not charter or pax.

Link to comment
Share on other sites

Well, I copied 100% of the given code above and tried it out and guess what? The passengers carried number never changed. Now I know why. When it is checking the database for cargo flights, it is showing me in the statistics that I only have 1 cargo flight total. Uhhhhh no. Not accurate. I have 12. I exported a fresh copy of the schedules this morn and sure enough it shows 12 of my flights as cargo and the rest as charter and cargo.

I then went and triple checked my db and it shows the same exact flights as the csv file as being cargo flights. :blink:

Link to comment
Share on other sites

And the plot thickens...... According to the statistics, only one flight flown haqs ever been a cargo flight according to the pireps table in the database. All the flight numbers reflect cargo flights, but only one was recorded as such. KACARS.

All the cargo flights flown using FSACRAS and Manual, as well as filing with XACARS are recorded as passenger flights in the database.

SO When a pirep is filed with anything BUT KACARS, it is wrong. If fly a cargo flight with KACARS, it is recorded in the database correct as a cargo flight.

I would easily drop FSACRS and XACARS on the spot, but at bare minimum, manual filing has to work. No way around it. ;)

**EDIT**

I just went in to the database and fixed a few of the flight types that were recorded wrong and low and behold, all the statistics numbers are adjusting the way this code was meant to show them.

**EDIT AGAIN**

THis issue is solved as of today 4/11/11

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...