[eluser]stuffradio[/eluser]
Do you see anything wrong with this function? I can't seem to find anything wrong with it but it's not doing anything.
Code:
function updateTheTeam()
{
if ($this->round == 1):
$data = array(
'course' => $this->course,
'rd1' => $this->rd1,
'celebScore' => $this->celebScore,
'thru' => $this->thru
);
$this->db->where('teamID', $this->teamID);
$this->db->update('teams', $data);
elseif ($this->round == 2):
$data = array(
'course' => $this->course,
'rd2' => $this->rd2,
'celebScore' => $this->celebScore,
'thru' => $this->thru
);
$this->db->where('teamID', $this->teamID);
$this->db->update('teams', $data);
elseif ($this->round == 3):
$data = array(
'course' => $this->course,
'rd3' => $this->rd3,
'celebScore' => $this->celebScore,
'thru' => $this->thru
);
$this->db->where('teamID', $this->teamID);
$this->db->update('teams', $data);
elseif ($this->round == 4):
$data = array(
'course' => $this->course,
'rd4' => $this->rd4,
'celebScore' => $this->celebScore,
'thru' => $this->thru
);
$this->db->where('teamID', $this->teamID);
$this->db->update('teams', $data);
endif;
}