2
0
mirror of https://github.com/ACSPRI/queXS synced 2024-04-02 12:12:16 +00:00

Make sure to fail if cannot update

This commit is contained in:
azammitdcarf
2009-05-29 01:24:37 +00:00
parent 54bea820c2
commit 6074274f7f

View File

@@ -213,7 +213,8 @@ function is_respondent_selection($operator_id)
$questionnaire_id = get_questionnaire_id($operator_id);
if (!$questionnaire_id) return false;
if (!$questionnaire_id)
return false;
$sql = "SELECT respondent_selection
FROM questionnaire
@@ -454,9 +455,13 @@ function get_case_id($operator_id, $create = false)
WHERE current_operator_id IS NULL
AND case_id = '$case_id'";
//should fail transaction if already assigned to another case
$db->Execute($sql);
//should fail transaction if already assigned to another case
if ($db->Affected_Rows() != 1)
{
$db->FailTrans();
}
}
}