You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
662 B

1 year ago
<?php
namespace App\Models;
use CodeIgniter\Model;
class Mauth extends Model
{
function cekuser($username)
1 year ago
{
11 months ago
$builder = $this->db->table('PEGAWAI');
$builder->select('PEGAWAI.*,DIM_KANTOR.TP_KANTOR,DIM_KANTOR.KD_KANWIL');
$builder->join('DIM_KANTOR', 'PEGAWAI.KD_KANTOR = DIM_KANTOR.KD_KANTOR');
$builder->where('PEGAWAI.NIP9', $username);
return $builder->get();
/* $query = $this->db->query("SELECT A.*,B.TP_KANTOR,B.KD_KANWIL FROM PEGAWAI A
LEFT JOIN DIM_KANTOR B ON A.KD_KANTOR = B.KD_KANTOR WHERE A.NIP9 = '" . $username . "'");
11 months ago
return $query; */
1 year ago
}
}