简体   繁体   中英

Tracking database usage using php and Mysql

I am designing a php mysql webapp. In that, a database usage log has to be maintained , which will record 1.User ip 2.Timestamp 3.operation performed(Add,edit or delete) 4.Colmns changed 5.rowid 6.old value 7.new value

Please suggest any example scripts.

If you are using your own database class, just add this logging to that class. Otherwise you will have to make a database class to do it and start using that class instead of using mysql_query directly.

There are many DB profilers available. You can configure that and use them. You can use XDebug.

Another link : http://particletree.com/features/php-quick-profiler/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM