Hello, I guess you are doing something wrong. I have just build up a little app from scratch with zf tool (attachment app.tar.gz) which simply "batch" updates 32 rows with new status - very dumy logic in controller:
$news = new Automobili_Model_Table_News();
$ids = range(1,32);
$news->update(
array('status' => $status),
$news->getAdapter()->quoteInto('id IN (?)', $ids, Zend_Db::INT_TYPE)
);
And it works good for me at least on my GNU/Linux.
Here's my php.ini (section of MySQLi):
mysqli.max_persistent = 15
mysqli.allow_persistent = Off
mysqli.max_links = 15
mysqli.cache_size = 2000
mysqli.default_port = 3306
mysqli.default_socket =
mysqli.default_host =
mysqli.default_user =
mysqli.default_pw =
mysqli.reconnect = Off
I have a FreeBSD running host so tomorow I'm gonna check this app against
it. Anyway you can try my dummy app by yourself (I've removed some portion
from your News table class (which was referring to another model) to be able
run this code).
Attached files are:
app.tar.gz - Application itself
dump.sql.gz - MySQL dump of table (I have used to test)
2010/5/24 Саша Стаменковић <[email protected]>:
> Okay, I'm using one connection, one db, one adapter, but still, I have
> problems. I'm pretty sure I'm using it right, because I'm using it like it
> says in the doc.
> The problem is, I can exec up to 15 queries in the row, and this quoteInto
> with array param is hitting my limits.
> I can send you my code on private mail Thomas.
>
> Regards,
> Saša Stamenković
>
>
> On Mon, May 24, 2010 at 9:27 PM, Thomas D. <[email protected]> wrote:
>>
>> Hi,
>>
>> Саша Стаменковић wrote:
>> > Sure, when you have unlimited number of db operation over
>> > a period of time. I'll come up with my own offline quoting.
>>
>> Seems like you are missing one fact all over the time:
>> That quoting would use a connection to a database server, isn't a problem,
>> because Zend_Db_* would use one connection across every component. Only if
>> you are working with multiple databases, it might be a problem, because you
>> would have one adapter per database (=nAdapter * 1 Connection = n
>> connections)...
>>
>> So again:
>> When you are working with just *one* database, everything should work
>> fine.
>> If not, *you* are doing something wrong.
>>
>> Doing your own quoting is everything but not safe. You should use the
>> adapter's escape function, if your application should be safe.
>>
>>
>> --
>> Regards,
>> Thomas
>>
>>
>
>
--
Sincerely yours,
Aleksey V. Zapparov A.K.A. ixti
FSF Member #7118
Mobile Phone: +34 617 179 344
Homepage: http://www.ixti.ru
JID: [email protected]
*Origin: Happy Hacking!
app.tar.gz
Description: GNU Zip compressed data
dump.sql.gz
Description: GNU Zip compressed data
