> CREATE TABLE parent(id INT NOT NULL, > PRIMARY KEY (id)) TYPE=INNODB; > > CREATE TABLE child(id INT, parent_id INT, > INDEX par_ind (parent_id), > FOREIGN KEY (parent_id) REFERENCES parent(id) > ON DELETE CASCADE) TYPE=INNODB;
OI!!! I'm going to sound like a complete ass now (I know).... But since when does MySQL support FOREIGN keys?????????? *gasp* MAN this is going to make my life SOOOO much easier *curses at phpMyAdmin for not having the option*.... *lick* *bounce* *all happy now* *goes to redo all his DBs* Now, I like MySQL 10 times more!!!! --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php