Re: mysql_fetch_array()
| From: | John Holmes | Date: | Wed, 18 Aug 2004 01:46:43 +0000 |
| Subject: | Re: mysql_fetch_array() | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-194101@lists.php.net to get a copy of this message | ||
Anthony Ritter wrote:
When using mysql_fetch_array() is it necsessary to specify the second argument - meaning the constant of MYSQL_NUM or MYSQL_ASSOC? I have seen many examples where it is left out and it is coded: $row = mysql_fetch_array($sql); as opposed to $row = mysql_fetch_array($sql, MYSQL_BOTH);Note that you can use mysql_fetch_row for the equiv. of MYSQL_NUM and mysql_fetch_assoc() for the equiv. of MYSQL_ASSOC. It's sort of a waste of resources to use mysql_fetch_array() when you really only use one or the other, but a lot of people do it. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals – www.phparch.com