2009年8月12日星期三

Re: [fw-db] update more rows at ones

Hi,

Could you explain, why you update every row separately instead of using one SQL query to update all rows?

Regards,

Denis

On Wed, Aug 12, 2009 at 3:05 PM, PHPScriptor <contact@phpscriptor.com> wrote:

Hello,

I have a lot of data that I need to update. But that takes so long:

$model = new Model();
$data   = $model->fetchAll();

for(...) {
 $model->update($data, 'id = ' . $i);
}

So is it possible to prepare an update query, and after the loop save it?
Something wit RowSets?

for(...) {
 $rowset->blabla = blabla;
}
$rowset->save();

A little example would be nice if this is possible ;-)

-----
visit my website at  http://www.phpscriptor.com/ http://www.phpscriptor.com/
--
View this message in context: http://www.nabble.com/update-more-rows-at-ones-tp24932410p24932410.html
Sent from the Zend DB mailing list archive at Nabble.com.




--
Kind regards,
 Denis Baklikov

没有评论: