Dear friend, Take a look,carefully, about how are create tables; All fields are INTeger type.Do a "select * from child;" to see what values are stored in tables....for your curiosity.
Good luck, Gelu _____________________________________________________ G.NET SOFTWARE COMPANY Permanent e-mail address : [EMAIL PROTECTED] [EMAIL PROTECTED] ----- Original Message ----- From: "MySQL" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, May 31, 2002 7:26 PM Subject: Constraints - Error or Bug???? Hi all, I just wonder. I have tried this example from www.mysql.org Doc. 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 SET NULL ) TYPE=INNODB; But, the constraint does not work propperly. If i add 1 and 2 in the parent table, and 1,1 and 1,6 in the child table, it still works. Does anyone know if there is a Bug in the mysql, or im just getting it all wrong???? If you know howto make the constraints work please write a little example - Thanks :-) Regards Frank Jørgensen --------------------------------------------------------------------- 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 --------------------------------------------------------------------- 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