我在 MySQL 中有错误。这是我的脚本:
<?php
include 'koneksi.php';
$data="SELECT * FROM `article` WHERE 1";
$result = mysql_query($data);
while ($row = mysql_fetch_array($result)) {
$judul1= $row['judul'];
$isi1=$row['isi'];
echo "<h2 align='center'> $judul1 </h2>";
echo "<p class='padding'>$isi1</p><hr>";
};
?>
结果:警告:mysql_fetch_array() 期望参数 1 是资源,布尔值在第 24 行的 C:\xampp\htdocs\cms\index.php 中给出
第 24 行:while ($row = mysql_fetch_array($result)) {
我该如何解决这个错误?
谢谢