Export flights to Volanta

If someone want export the phpvms7 flights to volanta, can be done exporting database data to csv with the next sql script.

NOTE: If you have flights currently in volanta and are the same of phpvms7 this isn’t overwrite, so you will have duplicate flights in Volanta (Volanta + phpvms7 flights)

SELECT dpt\_airport\_id AS Origin, arr\_airport\_id AS Destination, block\_off\_time AS DepartureTime, pireps.flight\_time AS Duration, airlines.name AS Airline, flight\_number AS FlightNumber, aircraft.icao AS AircraftType, registration AS AircraftRegistration, route AS Route, block\_on\_time AS ArrivalTime, distance AS Distance, fuel\_used AS Fuel FROM `pireps`, `aircraft`, `airlines` WHERE aircraft.id = pireps.aircraft\_id AND airlines.id = pireps.airline\_id AND user\_id=1 ORDER BY block\_on\_time DESC;

 

9 hours ago, ARV187 said:

If someone want export the phpvms7 flights to volanta, can be done exporting database data to csv with the next sql script.

NOTE: If you have flights currently in volanta and are the same of phpvms7 this isn’t overwrite, so you will have duplicate flights in Volanta (Volanta + phpvms7 flights)

SELECT dpt_airport_id AS Origin, arr_airport_id AS Destination, block_off_time AS DepartureTime, pireps.flight_time AS Duration, airlines.name AS Airline, flight_number AS FlightNumber, aircraft.icao AS AircraftType, registration AS AircraftRegistration, route AS Route, block_on_time AS ArrivalTime, distance AS Distance, fuel_used AS Fuel FROM pireps, aircraft, airlines WHERE aircraft.id = pireps.aircraft_id AND airlines.id = pireps.airline_id AND user_id=1 ORDER BY block_on_time DESC;

 

 

Do this with laravel relationships and by only using the Pirep model please  Then add a csv export to that code, there you go, you have something built for phpvms v7 as an addon. (A widget will do the trick, no need to go for a full scale module)

 

Condiser this as a learning target.

 

Good luck