Advertisement
kangjaz

App.php

Feb 17th, 2018
5,266
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.40 KB | None | 0 0
  1. <?php
  2. defined('BASEPATH') OR exit('No direct script access allowed');
  3.  
  4. class App extends CI_Model {
  5.  
  6.    function multi_insert($table = null, $data = array())
  7.    {
  8.       $jumlah = count($data);
  9.  
  10.       if ($jumlah > 0)
  11.       {
  12.          $this->db->insert_batch($table, $data);
  13.       }
  14.    }
  15.  
  16.    function get($table)
  17.    {
  18.       $this->db->from($table);
  19.  
  20.       return $this->db->get();
  21.    }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement