Re: [fw-general] Using fetch() in a loop, internal query doesn't work

2009-05-23 Thread Kamil
Thesee pisze: 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

Re: [fw-general] Using fetch() in a loop, internal query doesn't work

2009-05-23 Thread Thesee
If you read my first post you can see that I used al type of Zend_Db methods, first of all the Zend_Db_Statement Thank you Kamil N wrote: Hi You can use Zend_Db_Statement http://framework.zend.com/manual/en/zend.db.statement.html Example $stmt = $db-query('SELECT * FROM

Re: [fw-general] Using fetch() in a loop, internal query doesn't work

2009-05-22 Thread chrisweb
Thesee wrote: Hi all, i'm having some trouble fetching and making query trough a loop. (sorry for my bad english) to explain , please read the example : suppose to have 100 bugs unsolved. $stmt = $db-query('SELECT * FROM bugs'); while ($row = $stmt-fetch()) { echo

RE: [fw-general] Using fetch() in a loop, internal query doesn't work

2009-05-22 Thread Sergio Rinaudo
-update($data,$where); and also, did you notice that the var $row[bug_id'] is missing a ' ? Bye Sergio Rinaudo Date: Fri, 22 May 2009 15:09:03 -0700 From: the...@gmail.com To: fw-general@lists.zend.com Subject: Re: [fw-general] Using fetch() in a loop, internal query doesn't work

RE: [fw-general] Using fetch() in a loop, internal query doesn't work

2009-05-22 Thread Thesee
Rinaudo Date: Fri, 22 May 2009 15:09:03 -0700 From: the...@gmail.com To: fw-general@lists.zend.com Subject: Re: [fw-general] Using fetch() in a loop, internal query doesn't work chrisweb wrote: you could do it like this: $stmt = $db-query('SELECT * FROM bugs LIMIT 100

RE: [fw-general] Using fetch() in a loop, internal query doesn't work

2009-05-22 Thread Sergio Rinaudo
Date: Fri, 22 May 2009 15:58:12 -0700 From: the...@gmail.com To: fw-general@lists.zend.com Subject: RE: [fw-general] Using fetch() in a loop, internal query doesn't work Thanks for answer, what i wrote is only an example, no parse error on the code i'm testing or query error ;) I

RE: [fw-general] Using fetch() in a loop, internal query doesn't work

2009-05-22 Thread Thesee
these questions, I just want to help :) Sergio Rinaudo Date: Fri, 22 May 2009 15:58:12 -0700 From: the...@gmail.com To: fw-general@lists.zend.com Subject: RE: [fw-general] Using fetch() in a loop, internal query doesn't work Thanks for answer, what i wrote is only

[fw-general] Using fetch() in a loop, internal query doesn't work

2009-05-21 Thread Thesee
Hi all, i'm having some trouble fetching and making query trough a loop. (sorry for my bad english) to explain , please read the example : suppose to have 100 bugs unsolved. $stmt = $db-query('SELECT * FROM bugs'); while ($row = $stmt-fetch()) { echo $row['bug_description'].'br/'; } we