Advertisement
yusufmukharom

m_suplier

Mar 28th, 2020
347
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.72 KB | None | 0 0
  1. <?php
  2. class M_suplier extends CI_Model{
  3.  
  4.     function hapus_suplier($kode){
  5.         $hsl=$this->db->query("DELETE FROM tbl_suplier where suplier_id='$kode'");
  6.         return $hsl;
  7.     }
  8.  
  9.     function update_suplier($kode,$nama,$alamat,$notelp){
  10.         $hsl=$this->db->query("UPDATE tbl_suplier set suplier_nama='$nama',suplier_alamat='$alamat',suplier_notelp='$notelp' where suplier_id='$kode'");
  11.         return $hsl;
  12.     }
  13.  
  14.     function tampil_suplier(){
  15.         $hsl=$this->db->query("select * from tbl_suplier order by suplier_id desc");
  16.         return $hsl;
  17.     }
  18.  
  19.     function simpan_suplier($nama,$alamat,$notelp){
  20.         $hsl=$this->db->query("INSERT INTO tbl_suplier(suplier_nama,suplier_alamat,suplier_notelp) VALUES ('$nama','$alamat','$notelp')");
  21.         return $hsl;
  22.     }
  23.  
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement