You executes many queries in a for loop, absolutely not recommended. Use 
transactions or even better, loop through all models and create one query:
UPDATE my_table SET status='ACTIVE' where id IN (1,2,3,4,5,6,7,8). Both are 
possible with ZF.

Regards, Jurian

PS. Why activate a record by setting a value to string "ACTIVE"? You should 
look at some performance guide and use a kind of boolean field to set the 
state.
-- 
Jurian Sluiman
CTO Soflomo V.O.F.
http://soflomo.com

On Wednesday 19 May 2010 11:42:57 umpirsky wrote:
> Anyone who knows how this works in the backround?
> 
> It really kills the server. This error spam the error log, and site goes
> down, but I still can to connect to db from mysql client (other IP).

Reply via email to