gpt4 book ai didi

php - UPDATE 查询中没有更新一列

转载 作者:行者123 更新时间:2023-11-30 22:39:21 24 4
gpt4 key购买 nike

我有这个代码:

$get_season_end_time = $db->query("SELECT `end_times` FROM `seasons` ORDER BY `ID` DESC LIMIT 1")->fetch_assoc();
if (time() > $get_season_end_time['end_times']) {
$db->query("UPDATE `seasons` SET active='-1', ended='1' ORDER BY `ID` DESC LIMIT 1");
}

由于某种原因,ended 列正在更新,但 active 没有。

有什么建议吗?谢谢!

最佳答案

尝试将列的类型设置为DECIMAL

Standard SQL requires that DECIMAL(5,2) be able to store any value with five digits and two decimals, so values that can be stored in the salary column range from -999.99 to 999.99

关于php - UPDATE 查询中没有更新一列,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31522708/

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