Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Database \ 32-bit and 64-bit integer in PHP and MySQL range     - 4 lvcreate example commonly used commands (Linux)

- High-performance Linux system firewall detailed analysis of double-effect (Linux)

- Analyzing Linux server architecture is 32-bit / 64-bit (Server)

- Under Linux using Magent + Memcached cache server cluster deployment (Server)

- Based on OpenSSL for HTTPS service configuration (Server)

- Ubuntu 15.04 installed Nvidia Quadro series graphics driver (Linux)

- JavaScript notes --Objects (Programming)

- struts2 completely the wrong way to capture 404 (Programming)

- Oracle Database Restore (Database)

- Linux operating system security can not be ignored (Linux)

- How comprehensive resist attacks from the network (Linux)

- Set multiple IP addresses for a single network card on Ubuntu 15.10 (Linux)

- Effective Java - lazy initialization (Programming)

- namespace mechanism Linux kernel analysis (Linux)

- Binary tree to the next node (Programming)

- Based on Google Cloud Storage Mirroring open Maven Central Repository (Server)

- Linux directory structure (Linux)

- Install minimize RHEL / CentOS 7 some things need to do (Linux)

- MongoDB simple replication configuration (Database)

- Linux use additional rights (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:      
 
- Linux Security Module (LSM) Introduction (Linux)
- Vi syntax highlighting settings (Linux)
- Bootable ISO image using GRUB (Linux)
- 11.2.04 Oracle RAC directory crfclust.bdb file is too large, Bug 20186278 (Database)
- Those functions under Linux you do not know the df command (Linux)
- The headers for the current running kernel were not found when VirtualBox installation enhancements (Linux)
- 10 practical Java programming technology (Programming)
- DB2 Version SQLJ to access Oracle Server (Database)
- Realization of Linux operating system illegal IP censorship (Linux)
- Lua regex (string function) (Programming)
- Elasticsearch Kibana installation notes (Linux)
- hexdump Linux command (Linux)
- JavaScript, some conclusions about the implicit conversion (Programming)
- Linux, Firefox unloading and installation and upgrade (Linux)
- The direct insertion sort algorithm (Programming)
- Linux Hard Disk Partition and file system management (Linux)
- Management DB2 logs (Database)
- Build a Linux development environment under STC89C52RC (Linux)
- Linux Proc File System Experiment (Linux)
- Use Git in Eclipse (Linux)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.