Fix rollback and test errno

This commit is contained in:
KreizIT 2014-07-07 11:32:56 +02:00
parent 1a2ed2138b
commit 4e08e2b5d5

View File

@ -229,15 +229,16 @@ abstract class CommonObject
}
else
{
$this->db->rollback();
if ($this->db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS')
{
$this->error=$this->db->errno();
$this->db->rollback();
return -2;
}
else
{
$this->error=$this->db->error();
$this->db->rollback();
return -1;
}
}