Page 1 of 1

mysql_fetch_assoc vs mysql_fetch_array

Posted: Sun May 14, 2006 11:03 am
by shiznatix
Hello everybody!

Ok I have someone who says that mysql_fetch_array is faster than mysql_fetch_assoc. I can not really test this out myself as my other tests on my own server have proven to provide no results that matter compared to everyone elses. So I was wondering if anyone else had any information on this subject and maybe knows about this.

So thats it!

Posted: Sun May 14, 2006 11:25 am
by hawleyjr
From the horses mouth:

http://us3.php.net/manual/en/function.m ... -assoc.php
Performance: An important thing to note is that using mysql_fetch_assoc() is not significantly slower than using mysql_fetch_row(), while it provides a significant added value.
http://us3.php.net/manual/en/function.m ... -array.php
Performance: An important thing to note is that using mysql_fetch_array() is not significantly slower than using mysql_fetch_row(), while it provides a significant added value.