YOu can use this. returns true if rows affected by the update are greater than 1 else return false
function update_customer_records( $id, $data)
{
$this->db->where( 'id', $id );
$this->db->update( 'customers', $data );
//if affected rows > 0 reutrn true else false
return $this->db->affected_rows() > 0 ? TRUE : FALSE;
}
then on your controller you can use it as
if($this->model->update_customer_records() == FALSE)
{
// set the flashdata here
}else{
// do what you want if update is successful
}