Postingan lainnya
Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, bool given on line 419
1 Jawaban:
- Cek dulu koneksinya,
<pre> $connect = mysqli_connect("localhost", "root", "", "db"); </pre>
sumber: <a href='https://sekolahkoding.com/forum/warning-mysqli-fetch-array-expects-parameter-1-to-be-mysqli-result-boolean-given-in'>https://sekolahkoding.com/forum/warning-mysqli-fetch-array-expects-parameter-1-to-be-mysqli-result-boolean-given-in</a>
- Cek get datanya:
<pre> <?php include "../../koneksi.php"; $no = 1; $data = mysqli_query($koneksi, "select * from user1"); while ($d = mysqli_fetch_array($data)) { ?> <tr> <td><?= echo $no++; ?></td> <td><?= echo $d['id']; ?></td> <td><?= echo $d['nama']; ?></td> <td><?= echo $d['alamat']; ?></td> <td><?= echo $d['hp']; ?></td> <td><?= echo $d['pekerjaan']; ?></td> <td> </pre>
sumber: <a href='https://sekolahkoding.com/forum/error-mysqli-fetch-array-expects-parameter-1-to-be-mysqli-result-boolean-given-1564372020'>https://sekolahkoding.com/forum/error-mysqli-fetch-array-expects-parameter-1-to-be-mysqli-result-boolean-given-1564372020</a>