Codeigniter vote routine review
You have some cut and pasted code which can be re-factored by comparing already_voted with the direction rather than with 'up' and 'down' specifically.

if ($already_voted === false) {
    $this-&gt;db-&gt;insert('vote', $data);
    return true;
}
elseif ($already_voted == $direction) {
    return false;
}
else {
    $this-&gt;db-&gt;where(array('user_id' =&gt; $user_id, 'pronun_id' =&gt; $pronun_id));
    $this-&gt;db-&gt;update('vote', array('direction' =&gt; $direction));
    return true;
}