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

class Club_model extends CI_Model {

    /**
     * CONSTRUCTOR | LOAD DB
    */
    public function __construct() {
       parent::__construct();
       $this->load->database();
    }


    /**
     * SHOW | GET method.
     *
     * @return Response
    */
    public function show($id = 0)
    {        
        $this->db->from('club');
        $this->db->where('id', $id);
        // $this->db->where('aktif', '1');
        return $this->db->get()->row();
        // $sql = "select * from club where id='".$id."' and aktif='1' ";
        // return $this->db->query($sql)->row();
    }

    /**
     * get_paket_club function.
     * 
     * @access public
     * @param mixed $id
     */
    public function get_paket($id = 0) {     
        $this->db->select('paket');
        $this->db->from('club');
        $this->db->where('id', $id);
        return $this->db->get()->row()->paket;
    }


}
