Jump to content

[SOLVED] PHP function to get Enabled ACFTs?


MidoTheHawk

Recommended Posts

  • Moderators

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.

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