2008年11月2日星期日

[fw-db] Zend_Db_Adapter_Abstract::insert

Hello,

Is it possible to put many rows in one table at once using for example
method insert like this:

$rows = array(array(1, 'a'), array(2, 'b'));
$db->insert('table1', $rows)

Result in sql would be:
INSERT INTO table1 VALUES (1,'a'), (2, 'b')

I checked definition in Zend_Db_Adapter_Abstract::insert and it looks
like it is not possible :) but maybe some of you know the trick to do
this or maybe there is a method like insertMany or something like this.


greetings
--
Piotr Kabacinski
kabot@seo.pl

没有评论: