Re: PHP4 vs PHP5 classes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



jeff.mills@xxxxxxxxxx wrote:
>> Since the Players method is a constructor, it's more about how you set
>> the object(s) up.
>>
>> What does the loop look like before you create a new object?
>>
> 
> Well see here is where it gets messy! This is not my code - I've ported a
> phpnuke module over to dragonflycms.
> 
> The $players object is created before the loop:
> $players = new Players($lid);

<snip>

Which means the code is only executed once since it's in the
constructor. It's not changing per loop because you're not calling the code.

Maybe setting $this->max should be done in

fetchSelectData

since that's what is causing/creating your loop.

-- 
Postgresql & php tutorials
http://www.designmagick.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux