Re: DB Connect issue
| From: | Daniel Convissor | Date: | Thu, 27 May 2004 13:46:02 +0000 |
| Subject: | Re: DB Connect issue | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-29755@lists.php.net to get a copy of this message | ||
On Thu, May 27, 2004 at 12:27:12PM +0100, Lee McColl wrote:
First, this is a place for discussion of PEAR development. In the future,
for help USING PEAR, please use the pear-general mailing list.
> function connect()
> {
> $status = $this->dbh = DB::connect($this->db_url);
While this isn't your problem, you should be assigning by reference: =&
instead of =. Also, why are you even bothering reassigning to $status.
Just use $this->dbh in isError(), et al.
> get the error 'DB Error: not found'
That's what comes up when no DSN has been passed to connect(). Your
example doesn't set $this->db_url and I bet your real script doesn't
either.
--Dan
--
T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
data intensive web and database programming
http://www.AnalysisAndSolutions.com/
4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409