Re: Cannot connect to a MySQL DB using a Class
| From: | Neil Smith [MVP, Digital media] | Date: | Thu, 05 Jan 2006 15:44:38 +0000 |
| Subject: | Re: Cannot connect to a MySQL DB using a Class | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-40973@lists.php.net to get a copy of this message | ||
At 00:46 05/01/2006, you wrote:
Message-ID: <CC.FF.34518.54C6CB34@pb1.pair.com>
To: php-db@lists.php.net
Date: Wed, 04 Jan 2006 16:45:54 -0800
From: Todd Cary <todd@aristesoftware.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Subject: CAnnot connect to a MySQL DB using a Class
No doubt I am over looking something very simple, nevertheless I am baffled by not being able to connect to a MySQL DB.
// Error produced here!!
$this->db=mysql_connect($this->host,$this->user,$this->password);
mysql_select_db($this->database);
Surely you meant mysql_select_db($this->db); since that's what you connected to ?
Cheers - Neil