$status = $this->db->insert($this->table_name, $data);
$seriesId =$this->db->insert_id();
$genres = $this->input->post('genres');
foreach ($genres as $genreId) {
$data_genres = array(
'series_id' => $seriesId,
'genre_id' => $genreId,
);
$status = $this->db->insert($this->table_genres, $data_genres);
}
SELECT
*
FROM
turi
WHERE
city = '$city' AND country = '$country'
AND type_tour = '$type_tour'
AND tour = '$tour'
AND period_from = '$period_from'
AND period_to = '$period_to'
AND duration_from = '$duration_from'
AND duration_to = '$duration_to'
AND adult = '$adult'
AND children = '$children'
AND region LIKE '%$name_cit'
AND cathegory LIKE '%$name_star'
AND nutrition LIKE '%$name_nutri'
AND price BETWEEN '$price' AND '$p_to'