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