<?php
class M_bidang extends CI_Model{

		function tampil(){
		$query = $this->db->query("SELECT * FROM `bidang` ORDER BY namabidang ASC");		
		return $query;
		}
		function edit($id){
		$query = $this->db->query("SELECT * FROM bidang 
													WHERE idbidang = '$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);
		}			
}