Ver Mensaje Individual
  #6 (permalink)  
Antiguo 28/02/2013, 19:21
sefirotxx
 
Fecha de Ingreso: febrero-2011
Mensajes: 108
Antigüedad: 13 años, 3 meses
Puntos: 4
Respuesta: cambio dinamico en campo

Lo intente asi y me da el siguiente error:

# 1362 - Updating of NEW row is not allowed in after trigger

tambien trate de varias un poco el codigo, suponiendo que tambien necesitaba dicernir que el campo donde se queria agregar el timestamp estaba vacio:

Código MySQL:
Ver original
  1.     IF NEW.comprado = 's' AND NEW.recepcionado = 's' and NEW.fecha_cierre IS NULL THEN
  2.         SET NEW.fecha_cierre = NOW();
  3.     END IF;
  4.   END

Y nada me da el mismo error :(