Strider Posted May 9, 2020 Report Posted May 9, 2020 Is there away to export the pilots list into CSV format? Rather then going through the db as it makes it very difficult. Something like the way exporting the schedules can be done. I use currently phpvms 5.5.2 Quote
Administrators ProAvia Posted May 9, 2020 Administrators Report Posted May 9, 2020 The only way I know is to export as a CSV using phpMyAdmin. I guess you could write a routine similar to the export airports routine to export your pilots. Quote
Strider Posted May 9, 2020 Author Report Posted May 9, 2020 Where is that located? so I can see how it is coded. Quote
web541 Posted May 9, 2020 Report Posted May 9, 2020 It's in the Import module on the admin side: https://github.com/DavidJClark/phpvms_5.5.x/blob/master/admin/modules/Import/Import.php#L287 You could do the same and clean it up a little and probably get away with using PilotData::getAllPilots() and looping that through, or querying PilotData::findPilots() with your params/columns. 1 Quote
Strider Posted May 10, 2020 Author Report Posted May 10, 2020 I have created the code, and it works https://github.com/Strider2/export_pilot There it is. Quote
Administrators ProAvia Posted May 10, 2020 Administrators Report Posted May 10, 2020 Thanks @Strider Quote
Strider Posted May 10, 2020 Author Report Posted May 10, 2020 It doesn't give all the details from the pilots table, but it can be edited to do that. I will be working on the import function so if you have a server failure, and have lost details but you have downloaded the CSV you should be able to recover the pilots from that. Quote
Administrators ProAvia Posted May 11, 2020 Administrators Report Posted May 11, 2020 Excellent, looking forward to the update! 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.