Tolong pilih kategori sesuai, jenis posting (pertanyaan atau bukan) dan sertakan tag/topik yang sesuai misal komputer, php, mysql, dll.
Promosi atau posting tidak pada tempatnya akan kami hapus.
Mencantumkan kode program di posting Anda, tolong ikuti aturan yang sesuai, baca http://diskusiweb.com/discussion/39204/aturan-cara-menyisipkan-kode-program-di-diskusiweb

Baca cara posting gambar/image di post Anda: http://www.diskusiweb.com/discussion/47345/cara-menyisipkan-menyertakan-image-pada-posting/p1

Help. error mysqli_query() expects at most 3 parameters, 4 given in

Misi agan2.

Mohon pencerahannya mengenai error
mysqli_query() expects at most 3 parameters, 4 given in
dan error
mysqli_fetch_array() expects parameter 1 to be mysqli_result, null given in

codenya sbb:

$absensi=mysqli_query($koneksi, "SELECT a.line, m.nama, a.nik, YEAR(a.tanggal) AS thn,MONTH(a.tanggal) AS bln,GROUP_CONCAT(DAY(a.tanggal) ORDER BY a.tanggal ASC SEPARATOR ",") AS tgl,GROUP_CONCAT(a.absen ORDER BY a.tanggal ASC SEPARATOR ",") AS stat FROM absensi a LEFT JOIN personel m on m.nik=a.nik WHERE YEAR(a.tanggal)='2017' AND MONTH(a.tanggal)='07' GROUP BY DATE_FORMAT(a.tanggal, '%Y%m'), a.nik ORDER BY team ASC, nama ASC");
if($absensi === FALSE){die(mysqli_error());}
while($row=mysqli_fetch_array($absensi, MYSQLI_ASSOC)){
$absen=array_combine(explode(',',$row['tgl']),explode(',', $row['stat']));
echo "<tr><td>".$row['nama']."</td>";
for ($i=1; $i <= $max; $i++){
echo "<td>";
if(isset($absen['$i'])){echo $absen['$i'];}else{echo "Off";}
echo "</td>";
}
}


Mohon bantuannya buat :(
Sign In or Register to comment.