Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Database \ 32-bit and 64-bit integer in PHP and MySQL range     - Ubuntu 14.04.02 LTS startup items erroneous writing / dev / sda1 (win 7 loader) Repair (Linux)

- The Linux firewall is configured to use proxy (Linux)

- VNC connection VMware vSphere ESXi 5.5 (Linux)

- Netapp storage routine inspections and information gathering (Linux)

- Spacewalk remove packages install the update (Linux)

- Django url () function Detailed (Programming)

- Use regular expressions to check whether the input box to enter a URL (Programming)

- Under Ubuntu on how to use iptables firewall (Linux)

- VPN built on CentOS (Server)

- Linux user login and IP restrictions (Linux)

- CentOS 6.6 compile and install phpMyAdmin configuration PostgreSQL9.4.1 (Database)

- Ubuntu amend resolv.conf restart failure problem (Linux)

- To create and manage virtual machines on Ubuntu Redhat (Linux)

- Configure shared library PCRE (Linux)

- Linux Services Comments (Linux)

- A new method for Linux hidden files (Linux)

- Install Ubuntu text editor KKEdit 0.2.10 (Linux)

- ELKstack log analysis platform (Server)

- How to build a container cluster (Server)

- Select helps secure the system network management tools (Linux)

 
         
  32-bit and 64-bit integer in PHP and MySQL range
     
  Add Date : 2018-11-21      
         
         
         
 

A byte is 8 bits, so 32-bit int type occupies 32/8 = 4 bytes, 64-bit int type occupies 64/8 = 8 bytes.

32-bit, 64-bit unsigned integer Max:
2 ^ 64-1 = 18446744073709551615
  2 ^ 32-1 = 4294967295

  32-bit, 64-bit signed integer Max:
  (2 ^ 32) / 2-1 = 2147483647
  (2 ^ 64) / 2-1 = 9223372036854775807

1 is reduced because an integer including 0.

  64 Wei Ubuntu 14.04, PHP_INT_MAX value 9223372036854775807, with MySQL bigint type in the maximum symbol of the same
32 Wei Ubuntu 14.04, PHP_INT_MAX value of 2147483647, signed with MySQL. int type as the maximum
echo date ( 'Ymd H: i: s', PHP_INT_MAX); return 2038-01-19 11:14:07
  echo strtotime (' 2038-01. -19 11:14:07 '); return 2147483647
  echo strtotime (' 2038-01-19 11:14:08 '); 32 bits The following returns an empty
  That is, PHP on the system of time 32 bit () returns only the largest timestamp 2038-01-19 11:14:07.

field types: `posted` int (10) unsigned NOT NULL DEFAULT '0'
  on 32-bit MySQL (64 Wei MySQL too), than insert a 32-bit unsigned int type Max 2 ^ 32-1 = 4,294,967,295 larger number error occurs:
UPDATE `punbb`.`pb_topics` SET` posted` = '4294967296' WHERE `pb_topics`.`id` = 1;
  Warning: # 1264 Out of range value for column 'posted' at row 1
However, MySQL can use 8-byte bigint type to store 64-bit integers

     
         
         
         
  More:      
 
- Android project using the command to create and install the package (Programming)
- Analysis of Java in the deep copy and shallow copy (Programming)
- Linux Detailed instructions alias settings (Linux)
- MySQL composite partition (Database)
- Android start automatically and add and delete a desktop shortcut (Programming)
- Ubuntu batch scp to copy files without password (Linux)
- ASP.NET 5 (vNext) Linux deployment (Server)
- Linux --- manual release system cache (Linux)
- Nagios (centreon) monitoring Linux Log (Server)
- 20+ Best Practices article MySQL Performance Optimization (Database)
- PHP 5.3 New Features Detail (Linux)
- The signature can not be verified under Debian (Linux)
- CentOS install expect (Linux)
- Python exception summary (Programming)
- Bash variable expansion modifier (Programming)
- Configure the ASM process on Red Hat Linux 6.5 (Database)
- Zypper command for SUSE Linux package management (Linux)
- Use CutyCapt to convert HTML pages to png images on Linux (Linux)
- To_explore Linux system boot process (Linux)
- VirtualBox modify the size of the virtual machine disk VDI (Linux)
     
           
     
  CopyRight 2002-2020 newfreesoft.com, All Rights Reserved.