Abstraction. Since $db->fetch_array is wrapper, if you changed your database, mysql version, implementation details or wanted to add extra behaviour, $db->fetch_array provides a way to do so, since all the code would use an abstraction and not the direct mysql code.
Meaning... it would be a best practice to use $db->fetch_array if you are coding for Vbulletin
Quote:
Originally Posted by Attilitus
I actually was able to find a solution by using $db->fetch_row. The problem was that I was using numeric keys for certain result sets (which was something I would have prefered not to change because it was quite useful.)
Oddly enough $db->fetch_array does not appear to be fully inter-changable with mysql_fetch_array in this regard.
|
It's actually the equivalent of calling:
mysql_fetch_array($result, MYSQL_ASSOC)
and not plain mysql_fetch_array