MySQL uses the bigint field to store the phone 10-digit number, incredibly truncated. What to do with it

Source: Internet
Author: User
Tags truncated
MySQL uses the bigint field to store the phone 10-digit number, incredibly truncated.
How do I use the bigint field to store my phone number every time. No matter what the number of 11 digits, all only show 4294967295

------Solution--------------------
Echo Pow (2, 32); 4294967296

That's because you don't have a cell phone number treated as a string in PHP.

------Solution--------------------
The "integer value" type of PHP does not support 11-bit decimal numbers (this is said on a 32-bit operating system).
The "integer value" over the range is converted to "floating point" by PHP.

You have a problem, it is possible that you use some kind of database interface program, this situation has been a special treatment. In short, if you can see the final execution of INSERT into ... Statement, it is clear.

————————————————————————————————
Based on the plugin extension function provided by CSDN forum, I have made a signature file tool to share with you, welcome technical exchange:)
  • Related Article

    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.