DB_DataObject erro
| From: | standerby | Date: | Tue, 11 Dec 2007 18:49:11 +0000 |
| Subject: | DB_DataObject erro | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-28309@lists.php.net to get a copy of this message | ||
I try to use DB_DataObject in my application. However I got the following
error message. "DB_DataObject Error: Connect failed, turn on debugging to 5
see why". I set DB_DataObject::debugLevel(5) and it doesn't print out any
debug information. The following is piece of my code. I had created database
table classes successfully. Could anyone help me? Thanks.
<?php
DB_DataObject::debugLevel( 5 );
$options = &PEAR::getStaticProperty('DB_DataObject','options');
$options = array(
'database' => 'mssql://test:test@localhost/playw',
'schema_location' => 'C:/website/dataobjects/DataObjects/schema/',
'class_location' => 'C:/website/dataobjects/DataObjects/',
'require_prefix' => 'C:/website/dataobjects/DataObjects/',
'class_prefix' => 'DataObjects_',
);
$zipcodes = DB_DataObject::factory('TblZipcodes');
$zipcodes->find();
while ($zipcodes->fetch()) {
$smarty->append('zipcodes', array(
'Zipcode' => $zipcodes->Zipcode,
'City' => $zipcodes->City,
'State' => $zipcodes->State,
));
}
DB_DataObject::debugLevel();
?>
--
View this message in context: http://www.nabble.com/DB_DataObject-erro-tp14280458p14280458.html
Sent from the Pear - General mailing list archive at Nabble.com.