Jump to content

mysql_fetch_assoc vs. mysql_fetch_array


Michdd

Recommended Posts

Not on small queries, but when you're talking a couple of million rows there's probably going to be a difference. The greatest of the work is done fetching the data and not entering it into the array(s).

 

95% of the time I use mysql_fetch_assoc() simply because it makes the code more readable, but there is the odd time where you may need to use mysql_fetch_array(), just base the choice on the situation.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.