按ID删除数据mysql_fetch_array()期望参数1为资源

时间:2018-11-26 05:08:11

标签: delete-row

我正在尝试通过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);
?> 

0 个答案:

没有答案