Hy guys.
I'm using Zend Framework 1.0.1, and MySQL, trying to use a custom select with the Zend_Db_Select and a MySQL database, but cant get nothing from it.
My configs:
PHP Code:
[database]
db.adapter=PDO_MYSQL
db.config.host=localhost
db.config.port=3306
db.config.dbname=databasename
db.config.username=root
db.config.password=
My PHP test code:
PHP Code:
$oDB = Zend_Registry::get('db');
$oSelect = $oDB->select();
$oSelect->from('tbacao');
echo $oSelect->__toString(); // Return SELECT tbacao.* FROM tbacao
$result = $oSelect->query($oSelect->__toString());
foreach($result as $row) {
Zend_Debug::dump($row);
}
And nothing happens
I got the generated sql and run it on a query browser, and return all lines ok.
Any ideas?
Thanks.