Audit Table using Triggers

Posted by Jose on Stack Overflow See other posts from Stack Overflow or by Jose
Published on 2009-10-13T16:21:03Z Indexed on 2010/05/15 20:04 UTC
Read the original article Hit count: 341

Filed under:
|
|
|
DROP TABLE IF EXISTS `actividades`.`act_actividad_audit`;
CREATE TABLE  `actividades`.`act_actividad_audit` (
  `fe_creacion` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP 
                                   ON UPDATE CURRENT_TIMESTAMP,
  `usr_digitador` char(10) NOT NULL,
  `ip_digitador` char(15) NOT NULL,
  `id_act_actividad` int(10) unsigned NOT NULL,
  `titulo` char(64) NOT NULL,
  `act_prioridad_id` int(10) unsigned NOT NULL,
  `act_motivo_id` int(10) unsigned NOT NULL,
  `detalle` text,
  `detalle_tecnico` text,
  `hostname_id` int(10) unsigned NOT NULL,
  `hostname_nombre` char(50) NOT NULL,
  `es_SMOP` tinyint(1) NOT NULL,
  `url_SMOP` text,
  `es_tecnico` tinyint(1) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Auditoria Actividad General';

I want to populate that audit table with a trigger but how can i send or fill the values for usr_digitador or ip_digitador if that values are on client side.? please help

© Stack Overflow or respective owner

Related posts about mysql

Related posts about triggers