Re: PEAR MDB2 Unknown Error
- From: Rob Wilkerson <r.d.wilkerson@xxxxxxxxx>
- Date: Fri, 23 Nov 2007 14:41:50 -0800 (PST)
On Nov 23, 2:04 pm, Rob Wilkerson <r.d.wilker...@xxxxxxxxx> wrote:
Hey all -
I'm bumping into an issue with my installation of the MDB2 package
that I'm hoping someone else has seen. I'm trying to execute a query,
but get an "unknown error" exception that I can't seem to track down
(exact message is "MDB2 Error: unknown error").
I have an ObjectDAO class (which I'm creating via a factory) that
extends an abstract DataAccessObject class. The database connection
is created in the parent class' constructor and a connection *is*
being established. I just can't seem to query against it. Here's the
code I'm trying to execute:
=======================================================
$dao = DAOFactory::createDAO ( 'Object' );
$result = $dao->conn->query ( 'SELECT COUNT(1) FROM object' );
if ( PEAR::isError ( $result ) ) {
echo '<p>SQL Error</p>';
throw new Exception ( $result->getMessage() );}
new PHPDump ( $result->fetchRow() );
exit();
=======================================================
A dump of the $dao variable indicates that all properties and members
are public, as expected. Executing "./pear version" reveals:
PEAR Version: 1.6.2
PHP Version: 5.2.3
Zend Engine Version: 2.2.0
I've been fighting this all day and can't think of anything else to
try, nor can I find any additional information via Google. If
anyone's seen this, I'd really appreciate any insight.
Looks like I've got some kind of problem connecting to MAMP's MySQL db
on OS X. I haven't tracked down what it might be, but attempting to
use the standard mysqli_connect() and mysql_connect() functions yield
a more verbose error that at least gives me somewhere else to look...
.
- References:
- PEAR MDB2 Unknown Error
- From: Rob Wilkerson
- PEAR MDB2 Unknown Error
- Prev by Date: Re: PHP and daylight saving time
- Next by Date: Re: unexpected }
- Previous by thread: PEAR MDB2 Unknown Error
- Next by thread: Re: PEAR MDB2 Unknown Error
- Index(es):
Relevant Pages
|