if you’re ever tempted to do something like this
$data = array(
'password' => $new_password
);
$where = array(
'username' => $user_name,
'account_no' => $account_no
);
$this->db->where($where);
$this->db->update('table1',$data);
$this->db->update('table2',$data);DON’T!
db->update resets your where statement… I’ve just had the most frantic five minutes of my life, almost wiped out 15,000 users. good job it was a dev copy of the db, but bricks were well and truly sh*t.
might be worth mentioning this is in the docs. (in 48 point red, bold)