N
N
Nick Bukovskiy2017-09-27 14:34:33
MySQL
Nick Bukovskiy, 2017-09-27 14:34:33

Numbers change when inserting into the database, how to fix it?

The field type is INT, the numbers come with a POST request, I enter into the database, and in the database it’s not what I entered, but numbers like "2147483647". Lines transfers normally and if you change the field type in the database to varchar - it is displayed normally.
What's wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Fedorov, 2017-09-27
@sonterix

most likely numbers come big than it is admissible for int'a. Increase the field size for example to bigint

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question