Author Topic: Airplane log has data inconsistency with Pilot Log after update of timetable  (Read 15 times)

dohavik

  • Newbie
  • *
  • Posts: 32
    • View Profile
When I was looking for some data in my VAM airline I stumbled upon the following inconsistency:
My pilot logbook says that I did 2 flights WA1545 and WA1546. I can find it on page:/vam/index.php?page=pilot_details&pilot_id=XX (XX for number.)

When I look then at the airplane log, I see the following in the column Flight:
Flights are not connected to a different flightnumber namely AF1733 and AF1755.
I can find this on page: /vam/index.php?page=plane_info_public&registry_id=PH-XXX

In order to keep the airline running, I need to change my timetable (I alter fleets.sql, fleettype_routes.sql and routes.sql).
Now is the inconsistency based on the following:
Since the flights are Regular Simacars flights, I can find in the VAMPIREPS table in the database these flights:
Callsign: WA1545 and flight: WA1545, but the route_id states: 1137

Looking at the ROUTES table I find at route_id: 1137 the following flight: AF1733.

It means that the VAMPIREPS used the route_id column to connect to the ROUTES route_id to get the Flight. That is how this inconsistency happens.

Unaltered it means that you can only enter one time a timetable and not renew it more.

I also know the file that needs to be altered is: plane_info_public.php

Now I come with a solution, but I like to know from people that are better in PHP how I can get this connection.
So not: VAMPIREPS -> route_id -> ROUTES -> route_id -> Flight
But: VAMPIREPS -> flight -> ROUTES -> flight.

If someone knows php how to get this done, please let me know :)
« Last Edit: December 07, 2018, 07:59:15 AM by dohavik »