S
S
StanislavStd19992020-09-12 18:02:12
PHP
StanislavStd1999, 2020-09-12 18:02:12

Why is it that when you drive in a number more than 10 characters, only 10 and others are saved?

Why, when adding a number greater than 10 characters, in my case 14, only 10 is kept and the value is completely different?
How to store a number to 15-20 characters?

Initially, the column was created as int(32) DEFAULT NULL, and after as int(64) DEFAULT NULL, but this did not change anything.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Spartak (Web-StyleStudio), 2020-09-12
@StanislavStd1999

How to store a number to 15-20 characters?

Use BIGINT [UNSIGNED]
www.mysql.ru/docs/man/Column_types.html

L
Lander, 2020-09-12
@usdglander

32 and 64 in your case is not the bit depth of the stored number. This is the length of the output when displayed.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question