更新时间:2022-12-09 17:21:20
USE TIMESTAMPDIFF
MySQL function. For example, you can use:
SELECT TIMESTAMPDIFF(SECOND, '2012-06-06 13:13:55', '2012-06-06 15:20:18')
在您的情况下,TIMSTAMPDIFF
函数的第三个参数将是当前登录时间(NOW()
).第二个参数是上次登录时间,该时间已在数据库中.
In your case, the third parameter of TIMSTAMPDIFF
function would be the current login time (NOW()
). Second parameter would be the last login time, which is already in the database.