开发者

Detect whether updated rows have changed in a MySQL database

I've got two fields, one that has the userID of the user that updated the record, and one timestamp field for the time of the last update. I have several different points where users enter data and I'm trying to figure out the best way to stop the userID and timestamp from being updated if the user keeps all of the information the same (the MySQL updates put in the same exact information that's already there).

I tried us开发者_如何学编程ing mysql_affected_rows(), but it counts the rows that are updated even if the information entered remains the same. Any suggestions?


You run a select statement to check if something has changed before updating the row.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜