Question on mysql_fetch_object()

From: Date: Fri, 12 Oct 2001 07:25:19 +0000
Subject: Question on mysql_fetch_object()
Groups: php.general 
Request: Send a blank email to php-general+get-70886@lists.php.net to get a copy of this message
Hello All, Regarding the mysql_fetch_object() function: It accepts two parameters. First is the result, and second is one of the following: MYSQL_NUM MYSQL_ASSOC MYSQL_BOTH It appears to work similar to mysql_fetch_array(). The manual states: "numbers are illegal property names" In the context of: "mysql_fetch_object() is similar to mysql_fetch_array(), with one difference - an object is returned, instead of an array. Indirectly, that means that you can only access the data by the field names, and not by their offsets (numbers are illegal property names)." However, when MYSQL_NUM or MYSQL_BOTH are used, an object is returned with the numbers for properties: $oRow->0 $oRow->1 How can this be when "numbers are illegal property names"? -Jason Garber IonZoft.com

« previous php.general (#70886) next »