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.
我需要一种方法来不断地(在循环中)检查是否添加了新的 MySQL 行,如果是,对它做一些事情,特别是向用户发送与之相关的通知,但我可以处理。我只需要知道当 MySQL 行数发生变化时如何执行代码。
您可能希望考虑在插入和/或删除时使用 MySQL 触发器:
http://dev.mysql.com/doc/refman/5.0/en/triggers.html
http://net.tutsplus.com/tutorials/databases/introduction-to-mysql-triggers/