I know but you suggestion:
foreach ($resultSet as $row) {}

as I've wrote, will emit "mysql out of sync error" when another module 
(or event) use db driver. To resolve that we must loop at resultSet and 
get data,
but not convert all row object to array.



On 26/03/12 17:12, ralphschindler [via Zend Framework Community] wrote:
> In general, if you have a toArray() method, it is generally accepted
> that the return value of that method will be a PHP type array.
>
> If you are wanting to get the objects in your view, simply iterate over
> the ResultSet.  The default return type in the default ResultSet is a
> RowObject which is actually an extension of ArrayObject.
>
> foreach ($resultSet as $row) {}
>
> as opposed to:
>
> foreach ($resultSet->toArray() as $row) {}
>
> -ralph
>

-- 
? ?????????, ???????.
??? ???????????, ?????????? ????????? ? ???????? ?????? ?????.
eJoom Software Inc. <http://www.ejoom.com>


--
View this message in context: 
http://zend-framework-community.634137.n4.nabble.com/ZF2-Db-ResultSet-toArray-algoritm-tp4505005p4506019.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to