Have a look at this:

http://bakery.cakephp.org/articles/alkemann/2008/10/21/logablebehavior

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf
Of elogic
Sent: Monday, October 03, 2011 5:07 PM
To: CakePHP
Subject: Re: history log table

Thanks for the reply.

Are you able to explain further or direct me to something online that
could help me out in getting this sorted? I'm just starting with
cakephp.

Thankyou



On Oct 3, 7:59 pm, euromark <[email protected]> wrote:
> you could write a method in the model or even a behavior which will do
> that for you
> in the beforeSave() callback it can be triggered globally
>
> On 3 Okt., 06:38, elogic <[email protected]> wrote:
>
>
>
>
>
>
>
> > 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
[email protected] For more options, visit this group at
http://groups.google.com/group/cake-php

-- 
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
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to