php 实现自动监听Mysql数据库表的某一字段值当该值改变时触发数据库更新操作,该如何解决

WBOY
Release: 2016-06-13 13:45:07
Original
1492 people have browsed it

php 实现自动监听Mysql数据库表的某一字段值当该值改变时触发数据库更新操作
php 实现自动监听Mysql数据库表的某一字段值当该值改变时触发数据库更新操作。比如用户输入密码错误锁定用户账户,3小时后,自动解锁

------解决方案--------------------
那多简单
1.用户输入错误
2.php 更新数据库字段 block 写入当前时间


用户下次登录 ->验证密码正确->判断 是否 block 如果是 取得 时间 是否和当前时间超过 3小时 如果是 unblock 重置 block 时间为默认

当然你也可以先检查帐号是否block.



Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template