[eluser]bennyhill[/eluser]
Currently I am inserting multiple records at once with this code:
Code:
$data = array();
foreach ($_POST['tableGuests'] as $key => $value)
{
$temp = '('.$value.','.$_POST['owner_id'].')';
array_push($data, $temp);
}
$values = implode(",",array_values($data));
$sql = "INSERT INTO `table` (`attendee_id`, `owner_id`) VALUES ".$values;
$this->db->query($sql);
Is there a better, more simple way to do it with Active Record?