21/03/2013, 16:04
|
| | Fecha de Ingreso: diciembre-2012
Mensajes: 21
Antigüedad: 11 años, 11 meses Puntos: 0 | |
Respuesta: bien planteado para manejar claves foraneas y FULLTEXT Cierto, no he hablado con propiedad. Quería decir índice.
He mirado la pagina que me has recomendado y resolvi hacer este trigger:
DELIMITER |
CREATE TRIGGER deletecascade AFTER DELETE ON files
FOR EACH ROW
BEGIN
DELETE FROM portalfiles WHERE pfFileID = old.fileID;
DELETE FROM userfiles WHERE ufFileID = old.fileID;
DELETE FROM subjectfiles WHERE sfFileID = old.fileID;
END
|
DELIMITER ;
Me lanza el error:
#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 'DELIMITER #
CREATE TRIGGER deletecascade AFTER DELETE ON files
FOR EACH ROW
' at line 1 |