Does anyone know what the pros and cons of using mysql_fetch_object vs.
mysql_fetch_array.
I find it easier to use the object version because you dont have to code
any extra statements to put them into regular variables.
print $obj-field_name;
as opposed to
$field_name = $row[field_name];
Note that you can do this:
print $row[field_name];
Matthew Walker
Ecommerce Project Manager
Mountain Top Herbs
-Original Message-
From: Bryan Gintz [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 30, 2002 11:49 AM
To: PHP List
Subject: [PHP] MySQL Fetch_Array VS. Fetch_Object
AM
Subject: [PHP] MySQL Fetch_Array VS. Fetch_Object
Does anyone know what the pros and cons of using mysql_fetch_object vs.
mysql_fetch_array.
I find it easier to use the object version because you dont have to code
any extra statements to put them into regular variables.
print $obj
oh and mysql_fetch_object is a little slower then mysql_fetch_array()
Jim Lucas
- Original Message -
From: Bryan Gintz [EMAIL PROTECTED]
To: PHP List [EMAIL PROTECTED]
Sent: Wednesday, January 30, 2002 10:48 AM
Subject: [PHP] MySQL Fetch_Array VS. Fetch_Object
Does anyone know what
PROTECTED]
To: PHP List [EMAIL PROTECTED]
Sent: Wednesday, January 30, 2002 10:48 AM
Subject: [PHP] MySQL Fetch_Array VS. Fetch_Object
Does anyone know what the pros and cons of using mysql_fetch_object vs.
mysql_fetch_array.
I find it easier to use the object version because you dont have to code
any
- Original Message -
From: Bryan Gintz [EMAIL PROTECTED]
To: PHP List [EMAIL PROTECTED]
Sent: Wednesday, January 30, 2002 10:48 AM
Subject: [PHP] MySQL Fetch_Array VS. Fetch_Object
Does anyone know what the pros and cons of using mysql_fetch_object vs.
mysql_fetch_array.
I find it easier
6 matches
Mail list logo