Is it possible to use insert_batch with a select with codeigniter? For example I need to insert a batch of these:
INSERT INTO a (a_id, b_id, c_id)
SELECT {$a}, {$b}, c.id
FROM elci c
WHERE c.name = {$cName}
Or should I just build the query string manually and execute as regular query?
You can use
$this->db->query()or$this->db->simple_query()to do that,insert_batch()is only intended for otherwise-generated input.