Jump to content

[SOLVED] How easy is it to log changes to data made by a user, and display in php?


littlevisuals

Recommended Posts

Hi all  :)

 

I have a question if you may, im currently building a simple cms.  There will be an admin and a few users, but I would like there to be a section where it displays logs/changes to the database.

I have looked through google and bing for an answer and the only way I can think of is inserting datestamps in all my tables but no idea for users? :-\

 

Is there a log built into mysql which I could call? If not whats my best option?  ???

Thanks in advance!

The mysql query log (when it is enabled) only shows the queries and the client username that was used in the connection to the database server. The database has no idea what actual user on your site is causing anything to happen.

 

You will need to add code in your application to log the information you want. You can either log to a file error_log or log information to a database table.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.