<?php
class M_pemakai extends CI_Model{
		function tampil(){
			$this->db->select('*');
			$this->db->from('pemakai');
			$query = $this->db->get();						   		
			return $query;				
		}	
		function tampilhome(){
			$this->db->select('*');
			$this->db->from('pemakai');
			$query = $this->db->get();						   		
			return $query;
		}
		
		function edit($id){
			$query = $this->db->get_where('pemakai',array('idpemakai'=>$id));							
			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);
			}				
}