<?php
defined('BASEPATH') OR exit('No direct script access allowed');

class M_detail_hutang_anggota extends CI_Model{


  public function __construct()
  {
    parent::__construct();
    //Codeigniter : Write Less Do More
  }

  public function get_hutang_anggota($iddata_user)
  {
    // var_dump($id_pemesanan);
    // exit();
    $result = $this->db->select("*")
          ->from("pemesanan")
          ->where("data_user_iddata_user",$iddata_user)
          ->where("metode_pembayaran",2)
          ->get();
    return $result;
  }

  public function get_anggota($iddata_user)
  {
    return $this->db->get_where("data_user",["iddata_user"=>$iddata_user]);
  }


  // public function get_detail_pemesanan()
  // {
  //   $this->db->join("data_user", "data_user.iddata_user = pemesanan.data_user_iddata_user");
  //   $this->db->join("kurir","kurir.idkurir=pemesanan.kurir_idkurir");
  //   $this->db->where("metode_pembayaran",2);
  //   return $this->db->get("pemesanan");
  // }


}
