AUDIT : Log data table changes in YII


It is sometimes necessary to keep track of what changes were made to the database, and by whom. This is known as Audit Logging or an Audit Trail. I have seen several different ways of implementing Audit Logging, but have any ideas about hot to build this based on YII core?


Developers are spared the chore of designing and building auditing software as RADICORE comes supplied with a pre-built Audit Logging system which allows auditing to take place without the need to construct any additional audit tables or database triggers. All database changes are automatically written to the audit database whose contents can be viewed using a standard set of online screens.


  `session_id` bigint(20) unsigned NOT NULL default '0',

  `tran_seq_no` smallint(6) unsigned NOT NULL default '0',

  `table_seq_no` smallint(6) unsigned NOT NULL default '0',

  `field_id` varchar(255) NOT NULL default '',

  `old_value` text,

  `new_value` text,

  PRIMARY KEY  (`session_id`,`tran_seq_no`,`table_seq_no`,`field_id`),

  KEY `field_id` (`field_id`)


lIKE this based on radicore:


(builden in framework)


have any ideia about how to start anythink to log users activity?


This might help (not perfect though):…blebehavior.php

and documentation for it:…ogable_behavior