Row count is not available in unbuffered result sets.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Row count is not available in unbuffered result sets.

civrays
This post has NOT been accepted by the mailing list yet.
Following the example here;

http://framework.zend.com/manual/current/en/modules/zend.db.adapter.html

I have this code;

    $adapter = new Adapter(array(
            'driver' => 'Mysqli',
            'database' => 'wip',
            'username' => 'user',
            'password' => 'password'
        ));
       
        $adapter->query('select * from mytable where id = ?', array(1));

Gives this error;

Row count is not available in unbuffered result sets.

What gives?
Reply | Threaded
Open this post in threaded view
|

Re: Row count is not available in unbuffered result sets.

civrays
This post has NOT been accepted by the mailing list yet.
I found this solution;

'options' => array('buffer_results' => true)

However, I'm baffled because none of my existing ZF2 applications have this option set.