Ver Mensaje Individual
  #1 (permalink)  
Antiguo 05/05/2013, 13:09
Avatar de asdmaster
asdmaster
 
Fecha de Ingreso: marzo-2010
Mensajes: 98
Antigüedad: 14 años, 1 mes
Puntos: 2
error en triggers con PDO

Tengo el siguiente problema desde ayer y ya me la gano.
mi problema es que no puedo crear el triggers con PDO pero si puedo con el phpmyadmin.

al tratar de crear el triggers desde PDO me devuelve
Cita:
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 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
Código:
        DROP TRIGGER IF EXISTS categories_bd;
        DELIMITER |
        CREATE TRIGGER categories_bd BEFORE DELETE ON categories
        FOR EACH ROW BEGIN
            DELETE FROM forums WHERE fk_id_categorie = OLD.id_categorie;
        END
        |
        DELIMITER ;
Gracias...