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
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
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
-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
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
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
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
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