From 05d68e4ea4f780cb1a81d33c04d95f0b1764aa94 Mon Sep 17 00:00:00 2001 From: Brandon Savage Date: Fri, 18 Sep 2009 18:04:29 +0000 Subject: [PATCH] Updating mysql-insert-id documentation. More clearly explains why bigint will fail. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@288440 c90b9560-bf6c-de11-be94-00142212c4b1 --- language/oop5/interfaces.xml | 3 +-- reference/mysql/functions/mysql-insert-id.xml | 16 ++++++++-------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/language/oop5/interfaces.xml b/language/oop5/interfaces.xml index d4757e4466..9d18f06729 100644 --- a/language/oop5/interfaces.xml +++ b/language/oop5/interfaces.xml @@ -212,9 +212,8 @@ class b implements a An interface, together with type-hinting, provides a good way to make sure that a particular object contains particular methods. See - instanceof and + instanceof operator and type hinting. - operator. diff --git a/reference/mysql/functions/mysql-insert-id.xml b/reference/mysql/functions/mysql-insert-id.xml index eefc4d73c7..6bd194ed7f 100644 --- a/reference/mysql/functions/mysql-insert-id.xml +++ b/reference/mysql/functions/mysql-insert-id.xml @@ -64,14 +64,14 @@ printf("Last inserted record has id %d\n", mysql_insert_id()); &reftitle.notes; - mysql_insert_id converts the return type of - the native MySQL C API function - mysql_insert_id() to a type of - long (named int in PHP). - If your AUTO_INCREMENT column has a column type of BIGINT, - the value returned by mysql_insert_id - will be incorrect. Instead, use the internal MySQL SQL function - LAST_INSERT_ID() in an SQL query. + mysql_insert_id will convert the return type of the + native MySQL C API function mysql_insert_id() to a type + of long (named int in PHP). If your + AUTO_INCREMENT column has a column type of BIGINT (64 bits) the + conversion may result in an incorrect value. Instead, use the internal + MySQL SQL function LAST_INSERT_ID() in an SQL query. For more information + about PHP's maximum integer values, please see the + integer documentation.