我正在尝试通过ID从表中删除数据,但是出现以下错误消息之一:
mysql_fetch_array()期望参数1为资源,给定布尔值
或
mysqli_fetch_array()期望参数1为mysqli_result,给定布尔值
这是我的代码:
<?php
$id = $_GET['id'];
include('koneksi.php');
$query_delete = "DELETE merchantlist WHERE id_mlist='$id'";
if (mysql_query($conn,$query_delete)){
echo "Record deleted successfully";
header("Location:tngallsubmission.php");
}
else{
echo "Error deleting record". mysqli_error($conn);
}
mysqli_close($conn);
?>