gpt4 book ai didi

php - 查询更新不起作用

转载 作者:行者123 更新时间:2023-11-29 13:10:46 25 4
gpt4 key购买 nike

我正在使用MySQLi,我现在想要制作一个表单来编辑数据库中的一些条目,当然我想更新数据库中的数据。但由于某种原因什么也没有发生。也没有错误..我已经使用 var_dump 来查看 php 脚本是否从表单获取数据,工作正常。也许有人可以在更新代码中发现任何错误。

$con->query("UPDATE anime SET 
epcount = '".$eps."',
original_title = '".$otitle."',
japan_title = '".$jtitle."',
english_title = '".$etitle."',
genres = '".$genres."',
studio = '".$studio."',
season = '".$season."',
year = '".$year."',
state = '".$status."',
type = '".$type."',
manifestations = '".$manif."',
trailer = '".$trailer."',
description = '".$des."' WHERE id = '$animeId");

最佳答案

最后一行的问题

$con->query("UPDATE anime SET 
epcount = '".$eps."',
original_title = '".$otitle."',
japan_title = '".$jtitle."',
english_title = '".$etitle."',
genres = '".$genres."',
studio = '".$studio."',
season = '".$season."',
year = '".$year."',
state = '".$status."',
type = '".$type."',
manifestations = '".$manif."',
trailer = '".$trailer."',
description = '".$des."' WHERE id = '".$animeId."'");

以这种方式进行查询也是一种不好的做法

关于php - 查询更新不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22131105/

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