Jump to content

Export flights to Volanta


Recommended Posts

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;

 

  • Like 1
Link to comment
Share on other sites

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...