VIPAIR Posted October 18, 2015 Report Share Posted October 18, 2015 Hello i need some unchangeable and unique (for every flight) column in phpvms_acarsdata table like id, but flight id changes after every update. I need the unique column for sorting my flight paths with their flights. Thanks Quote Link to comment Share on other sites More sharing options...
Administrators simpilot Posted October 18, 2015 Administrators Report Share Posted October 18, 2015 The way the ACARS data is updated you are probably better to create a new table and populate it with the data you are looking for, or possibly use the pireps table to gather the data you are looking for. The current configuration updates any previous records by pilot id, even when it is the start of a new flight. This is done to control the size of that table. Quote Link to comment Share on other sites More sharing options...
Moderators Parkho Posted October 18, 2015 Moderators Report Share Posted October 18, 2015 The way the ACARS data is updated you are probably better to create a new table and populate it with the data you are looking for, or possibly use the pireps table to gather the data you are looking for. The current configuration updates any previous records by pilot id, even when it is the start of a new flight. This is done to control the size of that table. I have been trying to make the table update time shorter and wasn't successful. Where can I change the interval for updating the table? Quote Link to comment Share on other sites More sharing options...
VIPAIR Posted October 18, 2015 Author Report Share Posted October 18, 2015 The way the ACARS data is updated you are probably better to create a new table and populate it with the data you are looking for, or possibly use the pireps table to gather the data you are looking for. The current configuration updates any previous records by pilot id, even when it is the start of a new flight. This is done to control the size of that table. This is sql acars data update $query = 'UPDATE ' . TABLE_PREFIX . "acarsdata SET {$upd} WHERE `id`='{$flight_id}'"; This sql update acars date, right? But it shouldn't change flight id. Quote Link to comment Share on other sites More sharing options...
Administrators simpilot Posted October 18, 2015 Administrators Report Share Posted October 18, 2015 I have been trying to make the table update time shorter and wasn't successful. Where can I change the interval for updating the table? The update is triggered by the receipt of ACARs data from a client, there is nothing really to change in phpVMS, it will update as soon as it gets a update. This is sql acars data update $query = 'UPDATE ' . TABLE_PREFIX . "acarsdata SET {$upd} WHERE `id`='{$flight_id}'"; This sql update acars date, right? But it shouldn't change flight id. Not sure what you are saying here, or where the code is from. The code I see is; $sql = 'SELECT `id` FROM ' . TABLE_PREFIX . "acarsdata WHERE `pilotid`={$pilotid}"; It is going to pick the record by the pilot id. EDIT: I see where this code is from, it will not update the flight ID, but this is the database ID not a flight number if that is what you are thinking. Quote Link to comment Share on other sites More sharing options...
VIPAIR Posted October 18, 2015 Author Report Share Posted October 18, 2015 The update is triggered by the receipt of ACARs data from a client, there is nothing really to change in phpVMS, it will update as soon as it gets a update. Not sure what you are saying here, or where the code is from. The code I see is; $sql = 'SELECT `id` FROM ' . TABLE_PREFIX . "acarsdata WHERE `pilotid`={$pilotid}"; It is going to pick the record by the pilot id. EDIT: I see where this code is from, it will not update the flight ID, but this is the database ID not a flight number if that is what you are thinking. I have for example online flight. The phpvms_acarsdate has id (auto_increment) , pilotid, flightnum ... colums. Every minute acars client send updated data to phpvms (Function ACARSData::updateFlightData($pilotid, $data)) . And after every update id of row changes is it possible to don't change row id for whole flight? So after and while flight i want to use and row id as unique variable for all stats for this flight. Quote Link to comment Share on other sites More sharing options...
Administrators simpilot Posted October 18, 2015 Administrators Report Share Posted October 18, 2015 The auto incremented id of the table will not change for the same pilot number. 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.