k666 dites non à petitmou | hello
j'ai un probleme pour patcher une base et/ou creer une nouvelle table avec des foreign keys, :
Code :
- CREATE TABLE userpreferences
- (
- user_id INTEGER NOT NULL,
- preferences blob,
- PRIMARY_KEY (user_id),
- CONSTRAINT fk_user_id
- FOREIGN KEY (user_id)
- REFERENCES user(user_id)
- ON DELETE CASCADE
- ON UPDATE CASCADE
- ) TYPE=InnoDB;
- INSERT INTO crvright VALUES (010,'txt_role_preferences');
|
ca me repond ca:
Code :
- mysql> CREATE TABLE crvuserpreferences
- -> (
- -> user_id INTEGER NOT NULL,
- -> preferences blob,
- -> PRIMARY_KEY (user_id),
- -> CONSTRAINT fk_user_id
- -> FOREIGN KEY (user_id)
- -> REFERENCES crvuser(user_id)
- -> ON DELETE CASCADE
- -> ON UPDATE CASCADE
- -> ) TYPE=InnoDB;
- 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 '(user_id),
- CONSTRAINT fk_user_id
- FOREIG
- mysql>
|
je vois pas d'ou ca vient si kelkun peut me filer un coup de main |