views:

56

answers:

2

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.

+1  A: 

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.

Emil Vikström
A: 

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/

Zaje