function unlock() { $_SESSION['REQUEST_IN_PROGRESS'] = null; unset($_SESSION['REQUEST_IN_PROGRESS']); if (Config::useLocking() == false) { return; } global $db; if ($this->firsttimelock == true) { $this->firsttimelock = false; $query = "insert into " . Config::dbSurveyData() . "_interviewstatus (suid, primkey, mainseid, status) values(" . $this->getSuid() . ",'" . $this->getPrimaryKey() . "', " . $this->getMainSeid() . "," . INTERVIEW_UNLOCKED . ")"; } else { $query = "update " . Config::dbSurveyData() . "_interviewstatus set status=" . INTERVIEW_UNLOCKED . " WHERE suid = " . $this->getSuid() . " and primkey = '" . $this->getPrimaryKey() . "' and mainseid=" . $this->getMainSeid() . " LIMIT 1"; } $res = $db->executeQuery($query); }