Problems With Flights/Hours

I have a problem with one pilots flights.In his profile it shows him at 25 flights with the rank of First Officer. If you look at the log book he should have around 75 flights. He has 113.52 hours which should give him the rank of

I have my logbook paginated @ 25 per page. I took the paginate page down and upload the the default template and still the same problem. So I know the pagination is not the problem.

http://www.flyaka.com/index.php/profile/view/154

When I look in the admin under his PIREPS, it only shows 25 PIREPS.

Another thing, he is the only one with this problem. I looked at mine an other pilots, everything matches. He files his PIREPS manually. All my ranks are set correctly, and I have rested the hours in the settings.

Looks like they’re all in the logbook. In the phpvms_pilots table, what’s the number in the ‘totalpireps’ column?

And if you run:

SELECT COUNT(pirepid) FROM phpvms_pireps WHERE pilotid=HIS_PILOT_ID

Also something strange - the URL:

http://www.flyaka.com/index.php/profile/view/154

The ID is 154 , but on the page it shows:

Pilot ID: AKA 253

I guess you’ve entered an offset?

I will check that out. The reason for the offset numbers, because we start at AKA100. That’s the format we we used before phpVMS, so instead of changing every ones ID, I just changed the config to start at 100.

I will check that out. The reason for the offset numbers, because we start at AKA100. That’s the format we we used before phpVMS, so instead of changing every ones ID, I just changed the config to start at 100.

No problem there, seems like your offset is 99? But check the count of those two, see how they are? I might need to add a maintenance option to do a recount, not sure how they were off.

No problem there, seems like your offset is 99? But check the count of those two, see how they are? I might need to add a maintenance option to do a recount, not sure how they were off.

Will that be in 2.1 Nabeel?

Will that be in 2.1 Nabeel?

Yep, I’ll roll it into the next beta

1 Like

Yep, I’ll roll it into the next beta

AWESOME!

AWESOME!

It’s in there now

No problem there, seems like your offset is 99? But check the count of those two, see how they are? I might need to add a maintenance option to do a recount, not sure how they were off.

That didn’t work. In fact mostly everyone has been effected. I have 172 listed but only showing 20+ on my pirep view. I did have have the pirep_viewall.tpl paginated. Reverted just in-case that was the problem.

I ran this, and it exucuted correct, but had no effect.

SELECT COUNT(pirepid) FROM phpvms_pireps WHERE pilotid=1

Any ideas?

Anything about it. I been helping Eddie to find the problem but we are stuck to the SQL problems.

What’s that pilot’s ID?

Try pilotid=154

His pilot id is 154, That’s what I did. For mine, I used SELECT COUNT(pirepid) FROM phpvms_pireps WHERE pilotid=1

Is 175 PIREPs for you correct?

What’s the number it returns when you use ID 154

Is 175 PIREPs for you correct?

What’s the number it returns when you use ID 154

Yes the 175 is mine, when I ran it with the ID 154 it returned

SELECT COUNT( pirepid )
FROM phpvms_pireps
WHERE pilotid =154


COUNT(pirepid)
78

With the help of Kieran, we got it fixed.

What’d you do? Did you run the recount?

This query should fix it..

UPDATE phpvms_pilots p SET totalpireps = (SELECT count(*) from phpvms_pireps WHERE pilotid=p.pilotid);

Backup before you run it though.

There was a line of code in the core/common/PIREPData.class that I missed when I removed the pagination that controlled the rows per page. With that removed, everything works fine.

Oh ok, gotcha!