Reply to Re: mysql_fetch_assoc vs mysql_fetch_object

Your name:

Reply:


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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация