but when I try to add a new 'News' entry, I get the error:
ER_TRUNCATED_WRONG_VALUE_FOR_FIELD: Incorrect integer value: '' for column 'News_ID' at row 1.
The entry still gets saved but not the 'newsCategory'. When I get back to edit it again I can choses categories and also save them without error.
It seems like there is a problem creating an entry and simultaneously using its (auto generated) ID as a foreign key...
Hello, I have the following many to many relationship in my code:
but when I try to add a new 'News' entry, I get the error: ER_TRUNCATED_WRONG_VALUE_FOR_FIELD: Incorrect integer value: '' for column 'News_ID' at row 1.
The entry still gets saved but not the 'newsCategory'. When I get back to edit it again I can choses categories and also save them without error. It seems like there is a problem creating an entry and simultaneously using its (auto generated) ID as a foreign key...
Any ideas?