<?php

defined('BASEPATH') or exit('No direct script access allowed');

require_once 'Da_cluster.php';

class M_cluster extends Da_cluster
{

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

	public function get_all()
	{
		$sql = "SELECT * FROM {$this->db_name}.cluster
		Where cluster_id != 0";
        $query = $this->db->query($sql);
        return $query;
	}

	public function get_cluster_by_id($id){
		$sql = "SELECT name FROM {$this->db_name}.cluster
		Where cluster_id = $id";
        $query = $this->db->query($sql);
        return $query;
	}
}
