<?PHP
	class m_partners extends CI_Model{
		
		public function __construct()
		{
			parent::__construct();
		}
		
		function insert($data)
		{
			$this->db->insert('partners',$data);
		}
		
		function showList()
		{
			$query = $this->db->get('partners');
			return $query->result_array();
		}
		
		function update($id,$data)
		{
			$this->db->where('partnersId',$id);
			$this->db->update('partners',$data);
		}
		
		function showDetail($id)
		{
			$query = $this->db->get_where('partners',array('partnersId'=> $id));
			return $query->row_array();
		}
		
		function delete($id)
		{
			$this->db->where('partnersId',$id);
			$this->db->delete('partners');
		}
		
	}
?>