How do I test if my MySQL update query was successful in CodeIgniter?
As commented, have you tried $this->db->affected_rows()
?
That will tell you how many rows were updated.
if ($this->db->affected_rows() > 0)
{
return TRUE;
}
else
{
return FALSE;
}
or
if ($this->db->affected_rows() > 0)
return TRUE;
else
return FALSE;
or
return ($this->db->affected_rows() > 0) ? TRUE : FALSE;
EDIT
also(much better)
return ($this->db->affected_rows() > 0);