Reputation: 18560
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
Upvotes: 1
Views: 228
Reputation: 238081
To actually obtain any results from your $statement you should do this:
$results = $statement->fetchAll();
Upvotes: 3