I have written a patch for the Pdo_Mysql adapter that adds two methods:
// Inserts multiple rows into a table using one query
int Zend_Db_Adapter_Pdo_Mysql::insertMultiple(string $table, array $rows);
// Inserts multiple rows using ON DUPLICATE KEY UPDATE syntax
int Zend_Db_Adapter_Pdo_Mysql::insertOrUpdateMultiple(string $table, array $insertData, array $updateData = null);
I currently don't have a signed CLA so I need to get that before I can submit the patch. In the mean time, I'll submit the patch to the issue tracker for review.
--
Hector
On Tue, Oct 20, 2009 at 2:14 AM, Саша Стаменковић
<[hidden email]> wrote:
Also, please vote for http://framework.zend.com/issues/browse/ZF-2322
Regards,
Saša Stamenković
On Tue, Oct 20, 2009 at 11:12 AM, Саша Стаменковић
<[hidden email]> wrote:
The reason why this is not implemented is that not all RDBMS support bulk insert. But I vote for implementing it for ones that support it and maybe emulate for others or throw unsupported operation exception in that case. It would be nice to have this for at least MySQL.
Regards,
Saša Stamenković