Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
大家好,我有这个问题
UPDATE `account`.`account` SET `status` = 'Admin' WHERE `status` = 'User' AND `last_online`
我想做的是检查上次在线时间,并确保距离上次在线时间已经过去了 10 分钟。任何想法?谢谢
尝试这个::
UPDATE `account`.`account` SET `status` = 'Admin' WHERE `status` = 'User' AND TIMEDIFF(now(),`last_online`)>600
在数据库中查询最近的活动,然后在选择插入之前比较日期。