
08/11/2007, 11:05
|
 | | | Fecha de Ingreso: mayo-2007
Mensajes: 211
Antigüedad: 17 años, 8 meses Puntos: 2 | |
Re: Como ejecutar un trigger para mi BD desde CPanel Bueno creo que encontre la forma como insertar trigger desde phpmyadmin pero el problema es que ahora no me corre el trigger a ver me ayudan a corregirlo en la sintaxis! ahi va
Error
Parece haber un error en su consulta de SQL. La salida generada por el servidor de MySQL, de existir, aparece abajo, en cuyo caso puede ayudar a diagnosticar el problema.
ERROR: Signo de puntuación desconocido @ 11
STR: //
SQL: DELIMITER //
CREATE TRIGGER trCambiarEstadoInsert AFTER INSERT ON tdetallereserva
FOR EACH ROW
BEGIN
UPDATE thabitacion
SET estado = 'ocupado'
where nrohabitacion = NEW.nrohabitacion;
END;//
DELIMITER //
CREATE TRIGGER trCambiarEstadoInsert AFTER INSERT ON tdetallereserva
FOR EACH ROW
BEGIN
UPDATE thabitacion
SET estado = 'ocupado'
where nrohabitacion = NEW.nrohabitacion;
END;//
DELIMITER //
CREATE TRIGGER trCambiarEstadoInsert AFTER INSERT ON tdetallereserva
FOR EACH ROW
BEGIN
UPDATE thabitacion
SET estado = 'ocupado'
where nrohabitacion = NEW.nrohabitacion;
END;//
DELIMITER //
CREATE TRIGGER trCambiarEstadoInsert AFTER INSERT ON tdetallereserva
FOR EACH ROW
BEGIN
UPDATE thabitacion
SET estado = 'ocupado'
where nrohabitacion = NEW.nrohabitacion;
END;//
consulta SQL:
DELIMITER // CREATE TRIGGER trCambiarEstadoInsert AFTER INSERT ON tdetallereserva FOR EACH ROW BEGIN UPDATE thabitacion SET estado = 'ocupado' where nrohabitacion = NEW.nrohabitacion; END;//
MySQL ha dicho: Documentación
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TRIGGER trCambiarEstadoInsert AFTER INSERT ON tdetallereserva
FOR EACH ROW
BEG' at line 1
espero que esta vez me ayuden:)
Saludos |