Bonjour,
Voici ma requête :
insert into USER_TO_SERVICE (ID_SERVICE, ID_USER) select ($IDSERVICE, $IDUSERB) where not exists (select ID_SERVICE from USER_TO_SERVICE)
ID_SERVICE et $IDSERVICE sont des entiers ; ID_USER et $IDUSERB sont des varchar (100)
Celle-ci génère l'erreur suivante :
ERROR 1064 (42000) at line 1: 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 'where not exists (select ID_SERVICE from USER_TO_SERVICE)' at line 1
Quelqu'un peut-il m'aidier ?
MySQL est en version 5.0.32
Merci à tous.
Alf
