RE: [PHP] OOB problem, super stumped.
- From: brian@xxxxxxxxxxxx ("Brian Seymour")
- Date: Wed, 30 May 2007 17:06:10 -0400
Jim,
I put the link identifier back and made your recommended changes and now
everything works perfect. Can't thank you enough.
Is the reason you have to call the parents __construct() method because the
open mysql connection only exists within the scope of the object it was
created in, unless specified otherwise(calling parents constructor)?
Brian Seymour
AeroCoreProductions
http://www.aerocore.net/
-----Original Message-----
From: Jim Lucas [mailto:lists@xxxxxxxxx]
Sent: Wednesday, May 30, 2007 12:02 AM
To: Brian Seymour
Cc: 'php php'
Subject: Re: [PHP] OOB problem, super stumped.
You didn't call the __construct() method of your parent.
The above code, should be like this
public function __construct($host,$user,$pass,$dbname = null) {
parent::__construct($host,$user,$pass,$dbname);
echo "Auth constructed";
}
You were forgetting to call to the parent and have it initialize the DB
connection.
In the second part, the $auth->verifyCreds() call, it didn't create a
valid db connection to pass as the second arg to the mysql_query() call.
And by not passing the $this->conx as the second arg, you are telling it
to "use the most recently opened mysql connection.
Hope this clears up why it was failing on the latter mysql_query() calls.
.
- Follow-Ups:
- Re: [PHP] OOB problem, super stumped.
- From: Jim Lucas
- Re: [PHP] OOB problem, super stumped.
- References:
- Re: [PHP] OOB problem, super stumped.
- From: Jim Lucas
- Re: [PHP] OOB problem, super stumped.
- Prev by Date: Re: [PHP] Re: find (matching) person in other table
- Next by Date: Re: [PHP] find (matching) person in other table
- Previous by thread: Re: [PHP] OOB problem, super stumped.
- Next by thread: Re: [PHP] OOB problem, super stumped.
- Index(es):