Posted by Erwin Moller on 06/08/06 08:28
Paul Lautman wrote:
> Are there any benefits to using mysql_fetch_object() instead of
> mysql_fetch_assoc()?
mysql_fetch_assoc()?returns an assosiative array, mysql_fetch_object()
returns an object that contains the same row-information (name values).
So the syntax used to get the infortion out differs, not the actual content.
mysql_fetch_assoc()
use
$row["userid"]
mysql_fetch_object()
use
$row->userid
So the benefit would be that if you want an object, you use
mysql_fetch_object().
I am afraid there is nothing more to it.
Regards,
Erwin Moller
[Back to original message]
|