gpt4 book ai didi

php - 通过 url 查询从 mysql 中删除。错误 "Query was empty"

转载 作者:太空宇宙 更新时间:2023-11-03 11:04:33 25 4
gpt4 key购买 nike

<分区>

我正在尝试使用此 url 从数据库中删除一些内容:

siteurl.com/mail.php?action=delete&mail_id=10

使用此代码:

if ($action == delete) { 
if(isset($_GET['id'])) {
$deleteid = $_GET['id'];
$sql = "DELETE FROM mail WHERE mail_id = ".$deleteid." LIMIT 1";
$query = mysql_query($sql);
header('Location: '.$_SERVER['HTTP_REFERER'].' ');
exit();
}
}

但它不起作用,它显示错误:Query was empty

怎么了?

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com