Database Error Occured

 public function getDataAssesor()
    {
        $this->datatables->select("a.id_assesor, a.nip, a.nama_assesor, a.email, a.altes_id, b.nama_altes, (SELECT COUNT(id) FROM users WHERE username = a.nip OR email = a.email) AS ada");
        $this->datatables->from('altes a');
        $this->datatables->join('altes b', 'a.altes_id=b.id_altes');
        return $this->datatables->generate();
    }

    public function getAssesorById($id)
    {
        $query = $this->db->get_where('assesor', array('id_assesor'=>$id));
        return $query->row();
    }

diatas code phpnya

<div class="box">
    <div class="box-header with-border">
        <h3 class="box-title">Master <?= $subjudul ?></h3>
        <div class="box-tools pull-right">
            <button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i>
            </button>
        </div>
    </div>
    <div class="box-body">
        <div class="mt-2 mb-4">
            <a href="<?= base_url('assesor/add') ?>" class="btn btn-sm bg-purple btn-flat"><i class="fa fa-plus"></i> Tambah Data</a>
            <a href="<?= base_url('assesor/import') ?>" class="btn btn-sm btn-flat btn-success"><i class="fa fa-upload"></i> Import</a>
            <button type="button" onclick="reload_ajax()" class="btn btn-sm btn-default btn-flat"><i class="fa fa-refresh"></i> Reload</button>
            <div class="pull-right">
                <button onclick="bulk_delete()" class="btn btn-sm btn-danger btn-flat" type="button"><i class="fa fa-trash"></i> Delete</button>
            </div>
        </div>
        <?= form_open('assesor/delete', array('id' => 'bulk')) ?>
        <div class="table-responsive">
        <table id="assesor" class="table table-striped table-bordered table-hover">
            <thead>
                <tr>
                    <th>No.</th>
                    <th>NIP</th>
                    <th>Nama Assesor</th>
                    <th>Email</th>
                    <th>Alat Test</th>
                    <th class="text-center">Action</th>
                    <th class="text-center">
                        <input type="checkbox" class="select_all">
                    </th>
                </tr>
            </thead>
            <tbody></tbody>
            <tfoot>
                <tr>
                    <th>No.</th>
                    <th>NIP</th>
                    <th>Nama Assesor</th>
                    <th>Email</th>
                    <th>Alat Test</th>
                    <th class="text-center">Action</th>
                    <th class="text-center">
                        <input type="checkbox" class="select_all">
                    </th>
                </tr>
            </tfoot>
        </table>
        <?= form_close() ?>
    </div>

<script src="<?= base_url() ?>assets/dist/js/app/master/assesor/data.js"></script>

ini code view nya

avatar ikhw4n
@ikhw4n

1 Kontribusi 0 Poin

Dipost 4 tahun yang lalu

Belum ada Jawaban. Jadi yang pertama Jawaban

Login untuk ikut Jawaban