RE: [PHP] MySQL Fetch_Array VS. Fetch_Object
| From: | Matthew Walker | Date: | Wed, 30 Jan 2002 19:49:27 +0000 |
| Subject: | RE: [PHP] MySQL Fetch_Array VS. Fetch_Object | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-82797@lists.php.net to get a copy of this message | ||
Note that you can do this:
print "$row[field_name]";
Matthew Walker
Ecommerce Project Manager
Mountain Top Herbs
-----Original Message-----
From: Bryan Gintz [mailto:bgintz@jtlnet.com]
Sent: Wednesday, January 30, 2002 11:49 AM
To: PHP List
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->field_name";
as opposed to
$field_name = $row["field_name"];
print "$field_name";
Im just curious to see if there are any problems (resources, etc) that
come with using the object method???
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.317 / Virus Database: 176 - Release Date: 1/21/2002
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.317 / Virus Database: 176 - Release Date: 1/21/2002