New Contract:
contract_idTenderSelected - - - - - - - - is set to NULL (field not set on insert?)
contract_idSupplierContactSelected - is set to 0
Please can contract_idSupplierContactSelected also not be set so the DB can default to NULL
Edit Contract:
Both above fields get set to 0
Please can they be left as NULL if they are not used.
This will enable the referential integrity to be used (the FOREIGN KEY checking) on these fields.
New Contract: contract_idTenderSelected - - - - - - - - is set to NULL (field not set on insert?) contract_idSupplierContactSelected - is set to 0 Please can contract_idSupplierContactSelected also not be set so the DB can default to NULL
Edit Contract: Both above fields get set to 0 Please can they be left as NULL if they are not used.
This will enable the referential integrity to be used (the FOREIGN KEY checking) on these fields.