I am trying to insert a few rows into the MySQL table using Codeigniter and Active Records.
PHP Code
$data = array(\'......\'); //
Don't use insert_batch, as it actually runs the query. You want insert_string
$insert_query = $this->db->insert_string('my_table', $data);
$insert_query = str_replace('INSERT INTO','INSERT IGNORE INTO',$insert_query);
$this->db->query($insert_query);
UPDATE: This doesn't work for batch queries, only one row at a time.