Nette\Database: insert multiple rows in one query?

Notice: This thread is very old.
Member | 118


Edit: I'm sorry for this dumb question, I just figured out my app wasn't working as expected for another reason.

is it possible to insert multiple rows in one query using Nette\Database?

in MySQL I can write:

INSERT INTO foo(bar, baz) VALUES

Is this possible with Nette\Database?
Is it even possible to write this as a parametrized statement instead of manually escaping the values?


Just for you to know,

$context->query('INSERT INTO some_table', [['bar'=>'a','bar'=>'b'],['bar'=>'c','bar'=>'d']]);

works fine.

Last edited by amik (2014-11-20 01:19)