每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/