From 9a48d80eb1da96b38525ea78b178822403367108 Mon Sep 17 00:00:00 2001 From: Adam Zammit Date: Wed, 3 Sep 2014 16:08:01 +1000 Subject: [PATCH] Optimisation in system sorting (just update where not NULL) --- admin/systemsortprocess.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/admin/systemsortprocess.php b/admin/systemsortprocess.php index f7047f5a..588e93fa 100644 --- a/admin/systemsortprocess.php +++ b/admin/systemsortprocess.php @@ -184,7 +184,7 @@ while (!is_process_killed($process_id)) //check if process killed every $sleepin //Set all cases as unavailable $sql = "UPDATE `case` SET sortorder = NULL - WHERE 1"; + WHERE sortorder IS NOT NULL"; $db->Execute($sql); @@ -245,7 +245,7 @@ while (!is_process_killed($process_id)) //check if process killed every $sleepin //First set all sample records as unavailable $sql = "UPDATE `questionnaire_sample_exclude_priority` SET sortorder = NULL - WHERE 1"; + WHERE sortorder IS NOT NULL"; $db->Execute($sql);