0

here is my request,

INSERT INTO user(name,user_id,url,email,created,updated,phone,organisationID,role) VALUES ('Bastien Frey', '2196898165', 'https://cubber.zendesk.com/api/v2/users/2196898165.json', '[email protected]', '2016-01-19T16:21:07Z', '2016-01-19T16:21:07Z', '', '30567951','end-user'),('mathilde zimmer', '2297486669', 'https://cubber.zendesk.com/api/v2/users/2297486669.json', '[email protected]', '2016-01-26T12:04:20Z', '2016-01-26T12:04:20Z', '', '36094152','end-user')

But it insert the wrong user_id in my table, do you think this is a code or a database problem ? In my database i have something like that: enter image description here

1 Answer 1

1

You have defined user_id column as signed integer and you attempted to insert a value greater than the upper limit of this data type (2147483647). MySQL truncated the value to the maximum allowed by the data type (you do not have strict sql mode enabled, otherwise you would have received an error). Check out the warnings with show warnings command.

Change the field's data type to unsigned int or to (unsigned) bigint.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.