CarlosEduardo2409 Posted January 9, 2018 Report Share Posted January 9, 2018 (edited) Hello everyone, I wanted to know if there is a code to know the airport latitude of arrival and destination of a reservation ($bid), because I am trying to put a map in the page of bids and it goes blank, I believe it is because he does not can find the latitude and longitude, because for an pyrep would be that '$pirep-> arrlat' right? So if I put '$bid' in place of '$pirep' it does not work. Thanks. Edited January 10, 2018 by CarlosEduardo2409 Quote Link to comment Share on other sites More sharing options...
mischka Posted January 10, 2018 Report Share Posted January 10, 2018 which page/template is this for? Quote Link to comment Share on other sites More sharing options...
CarlosEduardo2409 Posted January 10, 2018 Author Report Share Posted January 10, 2018 For schedule_bids.php Quote Link to comment Share on other sites More sharing options...
mischka Posted January 10, 2018 Report Share Posted January 10, 2018 Ok, so in /core/common/scheduledata.class.php you go to around line 787 where you have the function getbids change the line where the sql is set to this $sql='SELECT dep.lat as deplat, dep.lng as deplng, arr.lat as arrlat, arr.lng as arrlng,, s.*, b.bidid, a.name as aircraft, a.registration FROM '.TABLE_PREFIX.'schedules s, '.TABLE_PREFIX.'bids b, '.TABLE_PREFIX.'aircraft a, '.TABLE_PREFIX.'airports dep, '.TABLE_PREFIX.'airports arr WHERE b.routeid = s.id AND s.aircraft=a.id and s.depicao=dep.icao and s.arricao=arr.icao AND b.pilotid='.$pilotid; that should give you of the deplat deplng and arrlat and arrlng and then you can add any other fields like name etc as you like. make sure you name them differently otherwise mysql gets confused 1 Quote Link to comment Share on other sites More sharing options...
CarlosEduardo2409 Posted January 10, 2018 Author Report Share Posted January 10, 2018 (edited) It worked! Thank you very much, thank you very much! Do you know if route_details appears? Because when I do a $ bids print_r the route details looks like this: [route_details] => a:0:{} Edited January 10, 2018 by CarlosEduardo2409 Quote Link to comment Share on other sites More sharing options...
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.