My client wants a listing of all actions that happen within the system
so they can check back and search the records at a later date.

I thought the best way to handle this would be to have a histories
table which would be similar to below:

CREATE TABLE `histories` (
        `id` INT(11) NULL AUTO_INCREMENT,
        `user_id` INT(11) NOT NULL DEFAULT '0',
        `action` VARCHAR(50) NULL DEFAULT NULL,
        `content` VARCHAR(250) NULL DEFAULT NULL,
        `created` DATETIME NULL DEFAULT NULL,
        `modified` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE
CURRENT_TIMESTAMP,
        PRIMARY KEY (`id`),
        INDEX `user_id` (`user_id`)
)


How would I go about inserting the user_id (the logged user - using
Auth), action (i.e. create, edit, delete, login etc) and content
(added joe blogs or deleted record ID123 etc) from every section
within the site?

Thanks

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to