When an INSERT operation returns an error 1216 (parent row does not exist, FK constraint failed), and there are multiple FK constraints in the target table, how do you know which one failed? Brute force method will work, of course (do a select on each foreign key in its referenced table). But aside from being a little hairy, parsing the DESCRIBE output, if I'm going to do all that work why use foreign key constraints in the first place? What am I missing? (Please don't say RTFM) (at least, not without a page number) :-) Aloha -David
|