<?php
class M_visi extends CI_Model{

	function get_all_visi(){
		$hsl=$this->db->query("SELECT visi_id,visi_deskripsi FROM tbl_visi ORDER BY visi_id ASC");
		return $hsl;
	}
	function simpan_visi($visi){
		$hsl=$this->db->query("INSERT INTO tbl_visi(visi_deskripsi) VALUES ('$visi')");
		return $hsl;
	}
	function update_visi($kode,$visi){
		$hsl=$this->db->query("UPDATE tbl_visi SET visi_deskripsi='$visi' WHERE visi_id='$kode'");
		return $hsl;
	}
	function hapus_visi($kode){
		$hsl=$this->db->query("DELETE FROM tbl_visi WHERE visi_id='$kode'");
		return $hsl;
	}
}
