(PHP)警告:mysqli_fetch_array()期望参数1为mysqli_result,给定布尔值

时间:2018-10-23 17:51:15

标签: php mysql

我的代码有问题吗?错误始终出现警告:mysqli_fetch_array()期望参数1为mysqli_result,给出布尔值 这是我的代码:

<?php
include '../setting/koneksi_database.php';

$sql_query = mysqli_query($koneksi, "SELECT * FROM pesan_backup, member WHERE pesan_backup.id_pengirim = member.id_member AND pesan_backup.id_penerima = member.id_pengirim");
?>

<table class="ui celled table">
    <thead>
        <tr>
            <th>Pengirim</th>
            <th>Kepada</th>
            <th>Subyek Pesan</th>
            <th>Isi Pesan</th>
            <th>Nama File</th>
            <th>Tanggal</th>
        </tr>
    </thead>
    <tbody>
        <?php while ($result = mysqli_fetch_array($sql_query)) : ?>
            <tr>
                <td><?php echo $result['nama_lengkap'] ?></td>
                <td><?php echo $result['id_penerima'] ?></td>
                <td><?php echo $result['tanggal'] ?></td>
                <td><?php echo $result['subyek_pesan'] ?></td>
                <td><?php echo $result['isi_pesan'] ?></td>
                <td><?php echo $result['nama_file'] ?></td>
            </tr>
        <?php endwhile; ?>
    </tbody>
</table>

0 个答案:

没有答案