<?php
class M_datacek extends CI_Model{
	
		function datapesan(){
			$query = $this->db->query("SELECT * FROM `pesan` ORDER BY idpesan DESC");	
			//$row = $hasil2x->row();	
			return $query;
		}	

		function pesandetail(){
		$query =$this->db->query("SELECT * FROM `pesandetail` ORDER BY idpesandetail DESC");	
			//$row = $hasil2x->row();	
			return $query;
		}	
		
		function in($data_save,$table){
					$this->db->insert($table,$data_save);
		} 	
		function update($where,$data,$table){
				$this->db->where($where);
				$this->db->update($table,$data);
		}	
			function hapus($where,$table){
				$this->db->where($where);
				$this->db->delete($table);
		}			
}
