Ok, so I have following SQL query:
INSERT INTO film_genre
(film_id, genre_id)
VALUES
(1, 1),
(1, 2),
(1, 3)
I need to convert this into CodeIgniter's active record syntax (CI2) and this is what I have so far, but I only get one data entry out of three:
$movie_genre = array(
'film_id' => $movies['id'],
'genre_id' => 1,
'film_id' => $movies['id'],
'genre_id' => 2,
'film_id' => $movies['id'],
'genre_id' => 3,
);
$this->db->insert('film_genre', $movie_genre );