MidoTheHawk Posted August 4, 2011 Report Posted August 4, 2011 Hello, I was wondering if there is something simillar to GetAllAircraft(), yet would give back ONLY the enabled aircrafts? Many Thnx Quote
Kairon Posted August 4, 2011 Report Posted August 4, 2011 Here ---> getAllAircraft($onlyenabled=true) Quote
Moderators mark1million Posted August 4, 2011 Moderators Report Posted August 4, 2011 Yes build in to the query a WHERE ENABLED=1 Cant remember the exact php file at the moment, will have a look in a bit as can remember at the moment off the top of my head Quote
Moderators mark1million Posted August 4, 2011 Moderators Report Posted August 4, 2011 Ok there is a fleet module you can download from the releases install that then you can modify teh FleetData.class.php file to, /** * Get an aircraft by unique name */ public static function getAircraftByName1() { $sql = 'SELECT DISTINCT `icao`, `fullname`, `range`, `weight`, `cruise`, `maxpax`, `maxcargo`, `imagelink`, `downloadlink` FROM ' . TABLE_PREFIX . 'aircraft [b]WHERE `enabled` = 1 ';[/b] return DB::get_results($sql); } The way i have is it to display Unique types only, as i have loads of a320 etc etc, so that will display all your different aircraft types. Quote
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.