flyalaska Posted March 25, 2010 Report Posted March 25, 2010 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. Quote
Administrators Nabeel Posted March 25, 2010 Administrators Report Posted March 25, 2010 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: AKA253 I guess you've entered an offset? Quote
flyalaska Posted March 25, 2010 Author Report Posted March 25, 2010 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. Quote
Administrators Nabeel Posted March 26, 2010 Administrators Report Posted March 26, 2010 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. Quote
Moderators Kyle Posted March 26, 2010 Moderators Report Posted March 26, 2010 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? Quote
Administrators Nabeel Posted March 26, 2010 Administrators Report Posted March 26, 2010 Will that be in 2.1 Nabeel? Yep, I'll roll it into the next beta 1 Quote
Moderators Kyle Posted March 26, 2010 Moderators Report Posted March 26, 2010 Yep, I'll roll it into the next beta AWESOME! Quote
Administrators Nabeel Posted March 26, 2010 Administrators Report Posted March 26, 2010 AWESOME! It's in there now Quote
flyalaska Posted March 29, 2010 Author Report Posted March 29, 2010 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? Quote
Moderators Kyle Posted March 29, 2010 Moderators Report Posted March 29, 2010 Anything about it. I been helping Eddie to find the problem but we are stuck to the SQL problems. Quote
Administrators Nabeel Posted March 29, 2010 Administrators Report Posted March 29, 2010 What's that pilot's ID? Try pilotid=154 Quote
flyalaska Posted March 29, 2010 Author Report Posted March 29, 2010 His pilot id is 154, That's what I did. For mine, I used SELECT COUNT(pirepid) FROM phpvms_pireps WHERE pilotid=1 Quote
Administrators Nabeel Posted March 29, 2010 Administrators Report Posted March 29, 2010 Is 175 PIREPs for you correct? What's the number it returns when you use ID 154 Quote
flyalaska Posted March 29, 2010 Author Report Posted March 29, 2010 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 Quote
flyalaska Posted March 29, 2010 Author Report Posted March 29, 2010 With the help of Kieran, we got it fixed. Quote
Administrators Nabeel Posted March 29, 2010 Administrators Report Posted March 29, 2010 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. Quote
flyalaska Posted March 30, 2010 Author Report Posted March 30, 2010 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. Quote
Administrators Nabeel Posted March 30, 2010 Administrators Report Posted March 30, 2010 Oh ok, gotcha! Quote
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.