Mysql uses the bigint field to store the 10-digit mobile phone number, which is truncated. What should I do?

Source: Internet
Author: User
Mysql uses the bigint field to store the 10-digit mobile phone number, which is truncated. How can I store a mobile phone number in the BIGINT field every time. No matter what the 11-digit number is, only 4294967295 and echopow (4294967296) are displayed; // is because you didn't treat the mobile phone number as a string in php, PH mysql used the bigint field to store the 10-digit mobile phone number, which was truncated.
How can I store a mobile phone number in the BIGINT field every time. No matter what the 11-digit number is, only 4294967295 is displayed.

------ Solution --------------------
Echo pow (2, 32); // 4294967296

That's because you didn't process the mobile phone number as a string in php.

------ Solution --------------------
The integer type of PHP does not support 11-bit decimal numbers (32-bit operating systems ).
The integer that exceeds the range is converted to a floating point number by PHP ".

The problem you encounter may be that you have used a database interface program to handle this situation. In short, if you can see the final execution of the insert into... statement, it will be clear.

--------------------------------
Based on the plug-in extension function provided by the CSDN forum, I have made a signing tool and shared it with you. we welcome Technical Exchange :)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.