gpt4 book ai didi

php - 无法执行查询: BIGINT UNSIGNED value is out of range

转载 作者:行者123 更新时间:2023-12-03 09:07:01 26 4
gpt4 key购买 nike

每10分钟启动一次cron作业后出现以下错误:

Output from command /usr/bin/php -q /var/www/html/mydomain/_cron/cron.php ..

PHP Notice: Can't execute query: BIGINT UNSIGNED value is out of range in '(`karsi_jiggo`.`user`.`hide_time` - 10)'
UPDATE user SET hide_time=(hide_time-10), last_visit=last_visit WHERE hide_time>0 in /var/www/html/MyDomain/_include/lib/db.php on line 100

Notice: Can't execute query: BIGINT UNSIGNED value is out of range in '(`karsi_jiggo`.`user`.`hide_time` - 10)'
UPDATE user SET hide_time=(hide_time-10), last_visit=last_visit WHERE hide_time>0 in /var/www/html/MyDomain/_include/lib/db.php on line 100

最佳答案

根据输出,看起来数据库中的数据中hide_time为> 0但小于10,因此,当您尝试从hide_time中减去10时,它将成为负数,并且对于无符号int而言是超出范围的。

要排除故障,您可以

SELECT * from user
WHERE hide_time > 0
AND hide_time < 10

关于php - 无法执行查询: BIGINT UNSIGNED value is out of range,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20572300/

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