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