Welcome Guest, Not a member yet? Register   Sign In
affected_rows results to 0 if Active Record update data is the same
#2

[eluser]rvillalon[/eluser]
I just found the following code on codeigniter that might solve my problem:

$this->db->set('column', 'value');
$result = $this->db->update('table');
if (!$result)
{
// there was an error
}
else if (!$this->db->affected_rows())
{
// no error, but nothing changed
}
else
{
// record changed
}


Messages In This Thread
affected_rows results to 0 if Active Record update data is the same - by El Forum - 08-05-2010, 09:26 PM



Theme © iAndrew 2016 - Forum software by © MyBB