Should fail transaction when trying to update where already assigned

This commit is contained in:
azammitdcarf
2009-05-28 23:36:30 +00:00
parent 7d6758e924
commit a883654b70
+3 -2
View File
@@ -456,9 +456,10 @@ function get_case_id($operator_id, $create = false)
$sql = "UPDATE `case`
SET current_operator_id = '$operator_id'
WHERE case_id = '$case_id'";
WHERE current_operator_id IS NULL
AND case_id = '$case_id'";
//should fail transaction if already assigned to another case
$db->Execute($sql);