[eluser]jerry01[/eluser]
In case this is useful to someone (because i could not find any example out there)
i need to update a table with a where clause on a joined table
Code:
function update_status ($username,$id, $status)
{
$this->db->join('tbl_updated', 'tbl_joined.id = tbl_updated.join_id');
$this->db->from('tbl_updated', 'tbl_joined');
$this->db->where('tbl_updated.id', $id);
$this->db->having('tbl_joined.username', $username);
return $this->db->update('tbl_updated', array('status' => $status));
}
anyway, somehow this works
any comments or question i'll try and help