On Wed, 2008-07-30 at 01:16 -0500, Larry Garfield wrote:
> On Wednesday 30 July 2008 12:44:46 am Robert Cummings wrote:
>
> > It's unfortunate that PHP5 decided to throw a Strict Standards exception
> > when you include both style constructors. For instance, I'm certain at
> > one point the follow
On Wednesday 30 July 2008 12:44:46 am Robert Cummings wrote:
> It's unfortunate that PHP5 decided to throw a Strict Standards exception
> when you include both style constructors. For instance, I'm certain at
> one point the following was recommended:
>
> class Foo
> {
> function __construct(
On Tue, 2008-07-29 at 22:26 -0700, Jim Lucas wrote:
> Chris wrote:
> >> Don't forget that in PHP5, the constructor named has changed. In PHP4
> >> it called a method with the same name as the class. But, in PHP5, it
> >> looks for __construct() instead.
> >
> > If __construct doesn't exist then
Chris wrote:
Don't forget that in PHP5, the constructor named has changed. In PHP4
it called a method with the same name as the class. But, in PHP5, it
looks for __construct() instead.
If __construct doesn't exist then it falls back to the php4 way - makes
it backwards compatible :)
But, i
> Don't forget that in PHP5, the constructor named has changed. In PHP4
> it called a method with the same name as the class. But, in PHP5, it
> looks for __construct() instead.
If __construct doesn't exist then it falls back to the php4 way - makes
it backwards compatible :)
--
Postgresql &
[EMAIL PROTECTED] wrote:
Maybe setting $this->max should be done in
fetchSelectData
since that's what is causing/creating your loop.
Thanks Chris, I copied the code into the fetchSelectData function and it
seems to be working fine now!
Just need to test removing the code from the constructor
[EMAIL PROTECTED] wrote:
>>> The $players object is created before the loop:
>>> $players = new Players($lid);
>>
>>
>> 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 sho
> Maybe setting $this->max should be done in
>
> fetchSelectData
>
> since that's what is causing/creating your loop.
>
Thanks Chris, I copied the code into the fetchSelectData function and it
seems to be working fine now!
Just need to test removing the code from the constructor to make sure its
>>
>> The $players object is created before the loop:
>> $players = new Players($lid);
>
>
>
> 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
>
> fetchSele
[EMAIL PROTECTED] 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 drago
>
> 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
> I have run through the script with a debugger, and sure
> enough, we only enter function Players once.
>
> Is this normal behaviour for PHP5 vs PHP4?
> Is there a way for me to force $this->max to be calculated each time
> function max is called?
Since the Players method is a constructor, it's
12 matches
Mail list logo