Reply to PEAR MDB2 Unknown Error

Your name:

Reply:


Posted by Rob Wilkerson on 11/23/07 19:04

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.

Thanks.

Rob

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация