Jump to content

Recommended Posts

Posted

I have a module I am building where I have extracted the pilots current location based off of this code:

$last_location = PIREPData::getLastReports($pilotid,1, PIREP_ACCEPTED);

However, this will only output the ICAO of the airport and not its actual name. Is it possible to get phpvms to pull the full airport name as it is inside the airports table of the database?

Posted

You could re-arrange the query, or you could just do it the easy way...

$last_location = PIREPData::getLastReports($pilotid,1, PIREP_ACCEPTED);
$last_location_apt = OperationsData::getAirportInfo($last_location->arricao);

$last_location_name = $last_location_apt->name;

echo $last_location_name;

Haven't tested it, but it should work ;)

  • Like 1

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...