From 9b5ed204228b2b863e592a906b4f0300225d6615 Mon Sep 17 00:00:00 2001 From: Adam Zammit Date: Wed, 27 Mar 2013 10:46:10 +1100 Subject: [PATCH] Fixed errors that seemed to afflict mysql 5.1.68 on windows with PHP 5.4 and IIS --- functions/functions.operator.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/functions/functions.operator.php b/functions/functions.operator.php index b102110d..764bc114 100644 --- a/functions/functions.operator.php +++ b/functions/functions.operator.php @@ -83,7 +83,7 @@ function is_using_availability($case_id) WHERE qa.questionnaire_id = c.questionnaire_id AND c.case_id = $case_id"; - $rs = $db->CacheGetRow($sql); + $rs = $db->GetRow($sql); if ($rs['cc'] > 0) return true; @@ -582,7 +582,7 @@ function get_case_id($operator_id, $create = false) //add respondent details to respondent (if such details exist in the sample) $sql = "INSERT INTO respondent (case_id,firstName,lastName,Time_zone_name) - SELECT $case_id as case_id, s1.val as firstName, s2.val as lastName, s3.Time_zone_name as Time_zone_name + SELECT $case_id as case_id, IFNULL(s1.val,'') as firstName, IFNULL(s2.val,'') as lastName, s3.Time_zone_name as Time_zone_name FROM sample as s3 LEFT JOIN sample_var as s2 on (s2.sample_id = '{$r3['sample_id']}' and s2.type = 7) LEFT JOIN sample_var as s1 on (s1.sample_id = '{$r3['sample_id']}' and s1.type = 6)