Posted by Jerry Stuckle on 04/13/07 04:26
amygdala wrote:
> "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.
>
>
No, because I would never do it that way per my previous response.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Navigation:
[Reply to this message]
|