On May 14, 2011, at 9:25 AM, Irishstudent wrote:

But when I use the following I only get 2,Bath returned i.e. one record

   $result = $gqry->fetchArray();

The fetchArray() method fetches only one row each time you call it. It fetches the next successive row in the result set. Use the fetchAll() method if you want an array of all rows returned in one call.

See both fetchArray() and fetchAll() documented here:

http://www.doctrine-project.org/docs/dbal/2.0/en/reference/data-retrieval-and-manipulation.html#fetchall

Regards,
Bill Karwin

--
List: [email protected]
Info: http://framework.zend.com/archives
Unsubscribe: [email protected]


Reply via email to