<?php 

class GenerateId_m extends CI_Model {

    function cekId($prefix, $tabel, $idTabel) {
        $this->db->from($tabel);
        $this->db->like($idTabel, $prefix, 'after');
        $this->db->order_by($idTabel, 'desc');
        $this->db->limit(1);
        return $this->db->get();
    }

}