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 ?
0
give a positive ratinggive a negative rating
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')
Share on FacebookShare on TwitterShare on LinkedInSend email
1 answer
x
x
2024 AnswerTabsTermsContact us