You are here: Re: mysql_fetch_assoc vs mysql_fetch_object « PHP Programming Language « IT news, forums, messages
Re: mysql_fetch_assoc vs mysql_fetch_object

Posted by Paul Lautman on 06/13/06 08:32

Steffen wrote:
> Hi Paul
> > Are there any benefits to using mysql_fetch_object() instead of
> mysql_fetch_assoc()?
> AFAIK there is only one major difference.
> mysql_fetch_assoc returns an array, mysql_fetch_object() returns an
> object that contains the same values as the array.
>
> mysql_fetch_assoc()
> $row["userid"]
>
> mysql_fetch_object()
> $row->userid
>
> Regards
> Steffen Jahr

Yes I know the difference. To me there are adantages of using
mysql_fetch_assoc() in that you can use the array functions such as
array_walk and uasort(). I was wondering if mysql_fetch_object() brought any
advantages that mysql_fetch_assoc() did not have?

 

Navigation:

[Reply to this 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

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