chrisweb wrote:
>
>
> you could do it like this:
>
> $stmt = $db->query('SELECT * FROM bugs LIMIT 100');
>
> $rows = $stmt->fetchAll();
>
> foreach ($rows as $row) {
>
> $db->query('UPDATE bugs SET solved = 1 WHERE bug_id =
> '.$row[bug_id']);
>
> }
>
>
Thank you for answer,
I know I can use fetchAll() method, but i have to use fetch() due the fact
fetchAll() can be a memory killer.
If I have a large amount of data (csv export, mass mailing send and so on) I
have to forgive fetchAll to prevent out of memory problem.
So I'm diggin to find a way to use query inside a fetch loop.....my opinion
is that it's a big bug on zend side.
All db layer i used can do this...i can't believe that zend_db cannot manage
this type of operations.
maybe i should fill a bug report?
Thank you
--
View this message in context:
http://www.nabble.com/Using-fetch%28%29-in-a-loop%2C-internal-query-doesn%27t-work-tp23656095p23678642.html
Sent from the Zend Framework mailing list archive at Nabble.com.