svn: /phpdoc/en/trunk/ language/oop5/interfaces.xml reference/mysql/functions/mysql-insert-id.xml

From: Date: Fri, 18 Sep 2009 18:04:29 +0000
Subject: svn: /phpdoc/en/trunk/ language/oop5/interfaces.xml reference/mysql/functions/mysql-insert-id.xml
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-4948@lists.php.net to get a copy of this message
brandon Fri, 18 Sep 2009 18:04:29 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=288440 Log: Updating mysql-insert-id documentation. More clearly explains why bigint will fail. Changed paths: U phpdoc/en/trunk/language/oop5/interfaces.xml U phpdoc/en/trunk/reference/mysql/functions/mysql-insert-id.xml Modified: phpdoc/en/trunk/language/oop5/interfaces.xml =================================================================== --- phpdoc/en/trunk/language/oop5/interfaces.xml 2009-09-18 14:33:08 UTC (rev 288439) +++ phpdoc/en/trunk/language/oop5/interfaces.xml 2009-09-18 18:04:29 UTC (rev 288440) @@ -212,9 +212,8 @@ <para> An interface, together with type-hinting, provides a good way to make sure that a particular object contains particular methods. See - <link linkend="language.operators.type">instanceof</link> and + <link linkend="language.operators.type">instanceof</link> operator and <link linkend="language.oop5.typehinting">type hinting</link>. - operator. </para> </sect2> Modified: phpdoc/en/trunk/reference/mysql/functions/mysql-insert-id.xml =================================================================== --- phpdoc/en/trunk/reference/mysql/functions/mysql-insert-id.xml 2009-09-18 14:33:08 UTC (rev 288439) +++ phpdoc/en/trunk/reference/mysql/functions/mysql-insert-id.xml 2009-09-18 18:04:29 UTC (rev 288440) @@ -64,14 +64,14 @@ &reftitle.notes; <caution> <para> - <function>mysql_insert_id</function> converts the return type of - the native MySQL C API function - <literal>mysql_insert_id()</literal> to a type of - <literal>long</literal> (named <type>int</type> in PHP). - If your AUTO_INCREMENT column has a column type of BIGINT, - the value returned by <function>mysql_insert_id</function> - will be incorrect. Instead, use the internal MySQL SQL function - <literal>LAST_INSERT_ID()</literal> in an SQL query. + <function>mysql_insert_id</function> will convert the return type of the + native MySQL C API function <literal>mysql_insert_id()</literal> to a type + of <literal>long</literal> (named <type>int</type> 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 + <link linkend="language.types.integer">integer</link> documentation. </para> </caution> <note>

« previous php.doc.cvs (#4948) next »