adeeva

max id

Mar 4th, 2018
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. public function tampil_sementara(){
  2. $max = $this->db->query("SELECT MAX(id_detil)FROM detil_km");
  3. $this->db->join('tb_type_kendaraan t','t.id_type=d.id_type','left');
  4. $this->db->join('tb_kendaraan k','k.id_kendaraan=d.id_kendaraan','left');
  5. $this->db->where('d.status_km',0);
  6. $this->db->where('d.id_detil',$max);
  7. $query=$this->db->get('detil_km d');
  8. return $query;
  9. }
Advertisement
Add Comment
Please, Sign In to add comment