Pengaturan

Gambar

Lainnya

Tentang KASKUS

Pusat Bantuan

Hubungi Kami

KASKUS Plus

© 2024 KASKUS, PT Darta Media Indonesia. All rights reserved

baduyherAvatar border
TS
baduyher
Help codeigniter gan?
Para master ane lagi butuh bantuan nih ane punya script berikut untuk menampilkan data dari database.
public function coba(){
$hasil="";

$w = $this->alternate->query("
select
a.USERID,
mid(datevalue([checktime]),1,10) as tanggal,
mid(Min(timevalue([checktime])),1,10) as jam_datang,
mid(Max(timevalue([checktime])),1,10) as jam_pulang
from checkinout a
group by userid, datevalue([checktime])
");

$hasil .= "<table class='table table-striped table-condensed'>
<thead>
<tr>
<th>No.</th>
<th>USERID</th>
<th>TANGGAL</th>
<th>JAM DATANG</th>
<th>JAM PULANG</th>
<th width='110'><a href='".base_url()."adminpegawai/dataodbc/konversi' class='btn btn'><i class='icon-plus'></i>KONVERSI</a></th>
</tr>
</thead>";
$i = $offset+1;
foreach($res = $w->result() as $h)
{

$hasil .= "<tr>
<td>".$i."</td>
<td>".$h->USERID."</td>
<td>".$h->tanggal."</td>
<td>".$h->jam_datang."</td>
<td>".$h->jam_pulang."</td>
<td>";

$i++;
}
$hasil .= '</table>';
$hasil .= '<div class="cleaner_h20"></div>';
$hasil .= $this->pagination->create_links();
return $hasil;
redirect('adminpegawai/dataodbc/hasil');
}

pertanyaanya gimana caranya script ane yang muncul dengan query itu langsung masuk kedalam tabel lain???

Mohon pencerahannya para master yg mengerti. Terimakasih
0
911
5
GuestAvatar border
Guest
Tulis komentar menarik atau mention replykgpt untuk ngobrol seru
Urutan
Terbaru
Terlama
GuestAvatar border
Guest
Tulis komentar menarik atau mention replykgpt untuk ngobrol seru
Komunitas Pilihan