<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class API_Model extends CI_Model{

	function __construct(){
		parent::__construct();
	}

	function get_available_apis(){
		$this->db->select('api_id,name,description')
			->from('available_apis')
			->order_by('name');
		$query = $this->db->get();

		return $query->result();
	}

	function get_api_info($api_id){
		$this->db->select('name,logo,model_file')
			->from('available_apis')
			->where('api_id', $api_id);
		$query = $this->db->get();

		return $query->num_rows() === 1 ? $query->row() : NULL;
	}
}

<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class API_Model extends CI_Model{

	function __construct(){
		parent::__construct();
	}

	function get_available_apis(){
		$this->db->select('api_id,name,description')
			->from('available_apis')
			->where('siteType', 'live')
			->order_by('name');
		$query = $this->db->get();

		return $query->result();
	}

	function get_api_info($api_id){
		$this->db->select('name,logo,model_file')
			->from('available_apis')
			->where('api_id', $api_id);
		$query = $this->db->get();

		return $query->num_rows() === 1 ? $query->row() : NULL;
	}
}

Make sure the main site only shows "live" APIs
Make sure the main site only shows "live" APIs

With the creation of the beta site, make sure the main page
only shows those APIs that are *not* beta and are ready
for production use
