I am executing query like 开发者_运维百科this in zend:
$front = Zend_Controller_Front::getInstance();
$bootstrap = $front->getParam('bootstrap');
$resource = $bootstrap->getPluginResource('db');
$dbAdapter = $resource->getDbAdapter();
$statement = $dbAdapter->query("SELECT * from test");
Now $statement
have Zend_Db_Statement_Mysqli
Object with fetched records in it but I don't know how to get column values from Zend_Db_Statement_Mysqli
. toArray()
is not working on $statement
.
Thanks
To actually obtain any results from your $statement you should do this:
$results = $statement->fetchAll();
精彩评论