You are here: Re: Strange class OOP behavior « PHP Programming Language « IT news, forums, messages
Re: Strange class OOP behavior

Posted by gosha bine on 08/27/07 14:50

On 27.08.2007 16:25 Marcel Molenaar wrote:
> Anyone ever experienced this problem.
>
> When i pass a mysql result to the constructor of a class and use that
> resultset inside that class the original resultset outside the class gets
> affected too. That is not right i think because my result inside my class is
> private. Is this a bug?

No, this is the expected behaviour. Resources, like db connections or
result handles are always assigned and passed as pointers, that is,
changing one variable will affect another one if both point to the same
object.


--
gosha bine

makrell ~ http://www.tagarga.com/blok/makrell
php done right ;) http://code.google.com/p/pihipi

 

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

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