|
Posted by NC on 01/24/06 00:42
Jon wrote:
> "Tony Marston" <tony@NOSPAM.demon.co.uk> said:
>
> > Ths function can only be used in an object as $this->connection refers
> > to a property called $connection within the current object. Have you
> > checked to see if $this->connection actually refers to a valid
> > resource? Where did the previous call to mysql_connect() store its
> > result?
>
> function constructor($host, $user, $pass, $database)
> {
>
> $this->connection = mysql_connect($host, $user, $pass) or die2
>
> This was modified from a more PHP5 compatible __constructor, and
> function cnstructor allowed it to "work" apparently, but not as well as
> I need it to.
In PHP 4, the consturctor has the same name as the class. So your
constructor() function is probably never executed.
Cheers,
NC
Navigation:
[Reply to this message]
|