Hi guys,
I am building a cms at the moment using the zend framework and have implemented a text based log which will log any errors and allows me to log any custom messages I may want recorded.
As part of the cms I need to provide some sore of revision history for pages, blog posts etc. My thoughts on this were to simple have a logs table to store the user, action, datatime, sql run, table name the query was executed on and the record.
To get the revision history for a page you would just query the log table for the table name and recordid for the current record viewed. Order by date desc. You could then provide the functionality to just revert to the revision desired by running the update statement in the sql column of the log table. If its an insert then figure something out to convert the insert into an update or dont allow the user to revert to the initial insert.
Is this the best way to accomplish this or am I being a bit simple.