posted 12 years ago
MySQL didn't used to support FKs constraints. There something about this in the docs, but I think only the InnoDB engine does. The default engine people use tends to be the MyISAM one, which doesn't support FK constraints. So first you have to convert or create your model with InnoDB tables then read the documentation aboout creating FK constraints.