Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- defined('BASEPATH') OR exit('No direct script access allowed');
- class lampukamar1 extends CI_Model{
- public function __construct()
- {
- parent::__construct();
- $this->load->database();
- }
- public function getLamp(){
- $this->db->select('status');
- $this->db->order_by('id_lk1', 'desc');
- $this->db->limit(1);
- $hasil = $this->db->get('lampukamar1')->result();
- return $hasil;
- }
- public function getLampFilter($id){
- $this->db->select('status');
- $this->db->where('id_lk1', $id);
- $this->db->order_by('id_lk1', 'desc');
- $this->db->limit(1);
- $hasil2 = $this->db->get('lampukamar1')->result();
- return $hasil2;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement