8791 sujets

Développement web côté serveur, CMS

VOila j'ai un problème dans le trigger suivant )= et ca urg grave!!! lol

CREATE TRIGGER AJOUT BEFORE INSERT ON inscrit
FOR EACH ROW
BEGIN

DECLARE temp varchar(20);
DECLARE curs CURSOR FOR select motdepasse from inscrit;
FETCH curs INTO temp
if temp = New.motdepasse THEN
LEAVE ;

end if;

END $$

A chaque fois jai cette erreur la ....

#1064 - Erreur de syntaxe près de 'if temp = New.motdepasse THEN LEAVE end if; END' à la ligne 8

Si quelqu'un voit une solution =)

Cordiaement