Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
- class M_pivot_tabel extends CI_Model {
- public function __construct(){
- parent::__construct();
- }
- public function TampilPivotPembayaran() {
- $sql_query=$this->db->query('call rekap_bayaran()');;
- if($sql_query->num_rows()>0){
- return $sql_query->result_array();
- }
- }
- public function list_all_data($tabel){
- $sql_query=$this->db->get($tabel);
- if($sql_query->num_rows()>0){
- return $sql_query->result_array();
- }
- }
- public function simpan(){
- $data=array(
- 'nis'=>$this->input->post('nis'),
- 'id_tagihan'=>$this->input->post('id_tagihan'),
- 'tgl_bayar'=>date('Y-m-d')
- );
- $this->db->insert('tbl_pembayaran',$data);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment