Posted by amygdala on 04/13/07 02:36
"Jerry Stuckle" <jstucklex@attglobal.net> schreef in bericht
news:_L2dncMv8Zyhf4PbnZ2dnUVZ_sPinZ2d@comcast.com...
> amygdala wrote:
<snip>
>
> One other thing - the class members shouldn't be static. Static members
> are shared by all objects of the class. So if you have two objects of
> this class and change it in one, both will change.
>
> Non-static data members are unique to each instantiation of the class.
Aaah yes of course. Silly me. Good point. I overlooked that one.
But would it be save to say that a derived class of DB_Table such as User
_could_ have a static $fields variable (for instance when I wont be
declaring it in the parent class first), since every User instance would
have the same table fields?
Thanks again Jerry et al.
[Back to original message]
|