McWilliams Posted February 12, 2014 Report Share Posted February 12, 2014 Hello, I know this has been discussed and I'm going assumed fixed in the latest version of phpvms, I've had a problem with my phpvms for the past 2 days now the total hours and total flights have not been updating at all before the 2/10/2014 they worked just fine. I've checked the DB it looks like the table is updating but if you run reset PIREP count it does re-count them but never updates the Pilot profile itself or the phpvms_pilot table. I did turn on debug mode and I will post what came up in the logs.txt here, I'm just really stumped as to why they won't update. The checks you normally ask someone who needs to run, I did that and they all came back as OK. I also sent an email to Jeff about the 1064 as I see the would kACARS in there so I assume he may know something about. ===== Time: 02.11.14 14:01:22 ===== Time: 02.11.14 14:01:22 Backtrace: DB::write_debug > DB::query > PilotData::updateProfile > Auth::ProcessLogin > kACARS->index > call_user_func_array > MainController::RunAllActions Query: UPDATE phpvms_pilots SET `lastlogin`=NOW(), `lastip`='116.202.177.148' WHERE `pilotid`= Error: (1064) - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 ===== ===== ===== Time: 02.11.14 14:23:03 ===== Time: 02.11.14 14:23:03 Backtrace: DB::write_debug > DB::query > PilotData::updateProfile > Auth::ProcessLogin > kACARS->index > call_user_func_array > MainController::RunAllActions Query: UPDATE phpvms_pilots SET `lastlogin`=NOW(), `lastip`='116.73.138.121' WHERE `pilotid`= Error: (1064) - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 ===== ===== ===== Time: 02.11.14 14:25:29 ===== Time: 02.11.14 14:25:29 Backtrace: DB::write_debug > DB::get_row > OperationsData::getAircraftInfo > FinanceData::getLoadCount > PIREPData::populatePIREPFinance > PIREPData::fileReport > ACARSData::FilePIREP > kACARS->index > call_user_func_array > MainController::RunAllActions Query: SELECT * FROM phpvms_aircraft WHERE `id`=B77F - GOOD Error: (1054) - Unknown column 'B77F' in 'where clause' ===== ===== ===== Time: 02.11.14 20:08:45 ===== Time: 02.11.14 20:08:45 Backtrace: DB::write_debug > DB::query > PilotData::updateProfile > Maintenance->resetpirepcount > call_user_func_array > MainController::RunAllActions Query: UPDATE phpvms_pilots SET `totalpireps`=16 WHERE `pilotid`=104 Error: (1054) - Unknown column 'totalpireps' in 'field list' ===== ===== ===== Time: 02.11.14 20:08:45 ===== Time: 02.11.14 20:08:45 Backtrace: DB::write_debug > DB::query > PilotData::updateProfile > Maintenance->resetpirepcount > call_user_func_array > MainController::RunAllActions Query: UPDATE phpvms_pilots SET `totalpireps`=4 WHERE `pilotid`=107 Error: (1054) - Unknown column 'totalpireps' in 'field list' ===== ===== ===== Time: 02.11.14 20:08:45 ===== Time: 02.11.14 20:08:45 Backtrace: DB::write_debug > DB::query > PilotData::updateProfile > Maintenance->resetpirepcount > call_user_func_array > MainController::RunAllActions Query: UPDATE phpvms_pilots SET `totalpireps`=24 WHERE `pilotid`=108 Error: (1054) - Unknown column 'totalpireps' in 'field list' ===== ===== ===== Time: 02.11.14 20:08:45 ===== Time: 02.11.14 20:08:45 Backtrace: DB::write_debug > DB::query > PilotData::updateProfile > Maintenance->resetpirepcount > call_user_func_array > MainController::RunAllActions Query: UPDATE phpvms_pilots SET `totalpireps`=36 WHERE `pilotid`=109 Error: (1054) - Unknown column 'totalpireps' in 'field list' ===== ===== ===== Time: 02.11.14 20:08:45 ===== Time: 02.11.14 20:08:45 Backtrace: DB::write_debug > DB::query > PilotData::updateProfile > Maintenance->resetpirepcount > call_user_func_array > MainController::RunAllActions Query: UPDATE phpvms_pilots SET `totalpireps`=87 WHERE `pilotid`=110 Error: (1054) - Unknown column 'totalpireps' in 'field list' ===== ===== ===== Time: 02.11.14 20:08:45 ===== Time: 02.11.14 20:08:45 Backtrace: DB::write_debug > DB::query > PilotData::updateProfile > Maintenance->resetpirepcount > call_user_func_array > MainController::RunAllActions Query: UPDATE phpvms_pilots SET `totalpireps`=27 WHERE `pilotid`=114 Error: (1054) - Unknown column 'totalpireps' in 'field list' ===== ===== ===== Time: 02.11.14 20:08:45 ===== Time: 02.11.14 20:08:45 Backtrace: DB::write_debug > DB::query > PilotData::updateProfile > Maintenance->resetpirepcount > call_user_func_array > MainController::RunAllActions Query: UPDATE phpvms_pilots SET `totalpireps`=9 WHERE `pilotid`=119 Error: (1054) - Unknown column 'totalpireps' in 'field list' ===== ===== ===== Time: 02.11.14 20:08:45 ===== Time: 02.11.14 20:08:45 Backtrace: DB::write_debug > DB::query > PilotData::updateProfile > Maintenance->resetpirepcount > call_user_func_array > MainController::RunAllActions Query: UPDATE phpvms_pilots SET `totalpireps`=15 WHERE `pilotid`=120 Error: (1054) - Unknown column 'totalpireps' in 'field list' ===== Regards, Chris McWilliams Quote Link to comment Share on other sites More sharing options...
Strider Posted February 13, 2014 Report Share Posted February 13, 2014 Probably a bad cache file, try cleaning the cache on your browser and within phpvms. Then run the reset hours and pireps. Quote Link to comment Share on other sites More sharing options...
McWilliams Posted February 14, 2014 Author Report Share Posted February 14, 2014 Well I can tell you I have cleared the cache and it didn't help, also everyone can see the numbers aren't updating so I'm pretty sure its not my browser. I did do a little experiment since the Error (1054) is looking for a column called totalpireps in the phpvms_pilots table and there isn't one, I changed the totalflights column to totalpireps and hit reset pirep count and it updated all the profiles to the correct Total Flights. I did have to change the column back to totalflights for that to be shown, my question is why does it call for a column thats not even there? Also thanks for the answer. Quote Link to comment Share on other sites More sharing options...
McWilliams Posted February 14, 2014 Author Report Share Posted February 14, 2014 Update: I have found in Admin>Modules>Maintenance>Maintenance.php public static function resetpirepcount() { echo '<h3>Reset PIREP Counts</h3>'; $all_pilots = PilotData::findPilots(array()); foreach($all_pilots as $pilot) { $pireps = PIREPData::getReportsByAcceptStatus($pilot->pilotid, PIREP_ACCEPTED); $total = count($pireps); unset($pireps); $code = PilotData::getPilotCode($pilot->code, $pilot->pilotid); echo "{$code} - {$pilot->firstname} {$pilot->lastname} - {$total} pireps<br />"; # Update the pireps table PilotData::updateProfile($pilot->pilotid, array('totalpireps' => $total)); } echo 'Completed!'; } I changed this: # Update the pireps table PilotData::updateProfile($pilot->pilotid, array('totalpireps' => $total)); } To this: # Update the pireps table PilotData::updateProfile($pilot->pilotid, array('totalflights' => $total)); } Then when i run reset pirep count I get no more errors and the totalflights update just fine in the phpvms_pilots table and their profiles. 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.