I am trying to insert a few rows into the MySQL table using Codeigniter and Active Records.
PHP Code
$data = array(\'......\'); //
I too had same issue what helped me is :
Open : Codeigniter/system/database/DB_query_builder.php :
find
protected function _insert_batch($table, $keys, $values)
{
return 'INSERT INTO '.$table.' ('.implode(', ', $keys).') VALUES '.implode(', ', $values);
}
and replace with :
protected function _insert_batch($table, $keys, $values)
{
return 'INSERT IGNORE INTO '.$table.' ('.implode(', ', $keys).') VALUES '.implode(', ', $values);
}