constraint foreign key mysql error when adding a foreign key?
most likely you chose the "set to null" action on delete or update of the record
and probably the fields have different data types, for example you're linking keys with numeric fields, but null is allowed in one and not in the other, or you're even trying to link a string field with a numeric one
Comments