Ver Mensaje Individual
  #1 (permalink)  
Antiguo 28/02/2014, 09:47
gordot
 
Fecha de Ingreso: febrero-2010
Ubicación: cba
Mensajes: 203
Antigüedad: 14 años, 3 meses
Puntos: 16
Mostrar error devuelto por un trigger

hola amigos? como estan? como hago para mostrar el error que me retorna el trigger y mostrarlo por php.


Código PHP:


IF NOT EXISTS (SELECT 1
FROM admin_users adm 
where adm
.id=NEW.PAT_USER_CREADOR THEN


            SET msg 
'EL USUARIO QUE INGRESO NO EXISTE.' ;
            
SIGNAL SQLSTATE '45000' SET message_text msg ;



    
END IF ; 

muchas gracias