Ver Mensaje Individual
  #6 (permalink)  
Antiguo 11/03/2009, 15:09
jurena
Colaborador
 
Fecha de Ingreso: marzo-2008
Ubicación: Cáceres
Mensajes: 3.735
Antigüedad: 17 años
Puntos: 300
Respuesta: ayuda con fecha

usa un timestamp que se genera automáticamente:
ALTER TABLE `tutabla` ADD `tiefecha` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ;

esto te añade un campo tiefecha que al insertar el dato pone la fecha

Y si quieres que te guarde también la de actualización:
ALTER TABLE `tutabla` ADD `tiefecha` TIMESTAMP ON UPDATE CURRENT_TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ;

Sin programación, automático.