1

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

1
  • @Z0q: Yes, Both fetchAll() and fetchAssoc() are working. Thanks Commented Feb 18, 2011 at 10:00

1 Answer 1

3

To actually obtain any results from your $statement you should do this:

$results = $statement->fetchAll();
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.