From 03522cb19fc73fbc7c649d8671651b0afd805e4d Mon Sep 17 00:00:00 2001 From: Chris Newbill Date: Wed, 20 Mar 2002 22:21:29 +0000 Subject: [PATCH] See Bug #16187 The second parameter can't be used cause a number cannot be used as an object property. ie row->0 is invalid while row->field is, so MYSQL_NUM and MYSQL_BOTH don't matter it should always be MYSQL_ASSOC. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@74383 c90b9560-bf6c-de11-be94-00142212c4b1 --- functions/mysql.xml | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/functions/mysql.xml b/functions/mysql.xml index a021a4fd70..a894bf24a8 100644 --- a/functions/mysql.xml +++ b/functions/mysql.xml @@ -1,5 +1,5 @@ - + MySQL Functions MySQL @@ -1134,9 +1134,6 @@ mysql_free_result($result); objectmysql_fetch_object resourceresult - int - result_type - Returns an object with properties that correspond to the fetched @@ -1150,11 +1147,18 @@ mysql_free_result($result); their offsets (numbers are illegal property names). - The optional argument result_type is a - constant and can take the following values: MYSQL_ASSOC, - MYSQL_NUM, and MYSQL_BOTH. See - mysql_fetch_array for explanation - of these constants. + +field; +// this is invalid +echo $row->0; + +?> +]]> + Speed-wise, the function is identical to