Incorrect integer value '' for column 'user_id' at row 1 - error

After MySQL version upgrade, I receive an error notification:

Incorrect integer value '' for column 'user_id' at row 1

There were no modifications in code performed, before the notification starts to appear. Would you please tell me what is incorrect / what has to be fixed ?
posted on 26.12.2019 at 14:24
0pnshow more
gettgett
Hi,

This error notification occurs when you attempt to INSERT or UPDATE data, but there is an incorrect or blank value assigned to a specific column. As mentioned in the notification, there is an integer value expected for column "user_id". So you have to assign some number value to this column.

For example, when you have MySQL table with columns:
id INT (6) NOT NULL auto_increment
user_id INT (6) NOT NULL
branch_id INT (6) NOT NULL
branch_name INT (6) NOT NULL
status VARCHAR (6) NOT NULL

Before, when you inserted only values branch_id, branch_name and status, it was valid to it this way:
INSERT INTO branch_list (branch_id,branch_name,status)
VALUES ('15', 'Central', 'opened')

Now, you have to include user_id column into the code and assign some number value to it, even if you don't need to:
INSERT INTO branch_list (user_id,branch_id,branch_name,status)
VALUES ('0','15', 'Central', 'opened')
posted on 31.12.2019 at 18:27
0pnshow more
TimTim
share on facebookshare on twitter
2020 AnswerTabsTermsContact us
This site uses cookies to improve your experience, for analytics and ads. By continuing to browse this site you agree to our use of cookies.