im a newbie for codeigniter. i need some help to solve my problem.
so i have a table filled with data that i GET from database (which only display the last timestamp for category "no_registrasi"). and there is an option in "Selesai" to remove the row in the html table without delete it in database. i already tried to find the solution, but i have no idea how to do this.
this is my table html
<table id="tabel-pas" class="table table-striped table-bordered dt-responsive wrap" cellspacing="0" width="100%">
<thead>
<tr>
<th>Waktu</th>
<th>No. Registrasi</th>
<th>No. Rekam Medis</th>
<th>Nama Dokter</th>
<th>Nama Pemilik</th>
<th>Nama Hewan</th>
<th>Aksi</th>
</tr>
</thead>
<tbody>
<?php
$no = 1;
foreach($daftar_inap_aktif as $row){
echo "<tr>";
echo '<td>'.$row->waktu.'</td>';
echo "<td>".$row->no_registrasi."</td>";
echo "<td>".$row->no_rm."</td>";
echo "<td>".$row->username."</td>";
echo "<td>".$row->nama_pemilik."</td>";
echo "<td>".$row->nama_hewan."</td>";
echo '<td>';
echo '<a href="linktoforminap?id='.$row->id.'">Tambah</a> | <a href="#">Selesai</a>';
echo'</td>';
echo"</tr>";$no++;
}
?>
</tbody>
</table>
here is my model
function daftar_inap_aktif()
{
$this->db->select('*');
$this->db->select_max('waktu');
$this->db->from('inputrminap');
$this->db->group_by('no_registrasi');
$this->db->order_by('waktu', 'DESC');
$query = $this->db->get();
return $query->result();
}
and here is my controller
function daftar_inap()
{
$data['daftar_inap_aktif'] = $this->rekammedis_model->daftar_inap_aktif();
$this->load->view('daftar_inap_view', $data);
}