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

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to