Advertisement
Guest User

Model

a guest
Jul 17th, 2018
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. <?php
  2. if (!defined('BASEPATH'))
  3. exit('No direct script access allowed');
  4.  
  5. class Shopping_cart_model extends CI_Model
  6. {
  7. /* public function save($data){
  8. for($x = 0; $x=count($data); $x++){
  9. $data[] = array(
  10. 'kode' =>$data[$x]['no'];
  11. );
  12. }
  13. }*/
  14. function fetch_all()
  15. {
  16. $query = $this->db->get("data_barang");
  17. return $query->result();
  18. }
  19. function insertdata($data)
  20. {
  21. $this->db->insert('barang_masuk', $data);
  22. }
  23.  
  24.  
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement