From: Roland Häder Date: Thu, 11 Aug 2011 17:21:05 +0000 (+0000) Subject: Also these SQLs require support for NULL X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=7305f8a35f5174c6191c0bf7ed360e6ee43dc751;p=mailer.git Also these SQLs require support for NULL --- diff --git a/inc/modules/admin/overview-inc.php b/inc/modules/admin/overview-inc.php index 72007a445f..80b11f7c4e 100644 --- a/inc/modules/admin/overview-inc.php +++ b/inc/modules/admin/overview-inc.php @@ -43,7 +43,7 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { // @TODO This function does also check for uncompleted tasks function outputStandardOverview (&$result_tasks) { // First check for solved and not assigned tasks and assign them to current admin - SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_task_system` SET `assigned_admin`=%s WHERE assigned_admin < 1 AND status != 'NEW'", + SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_task_system` SET `assigned_admin`=%s WHERE `assigned_admin` IS NULL AND status != 'NEW'", array(getCurrentAdminId()), __FILE__, __LINE__); // We currently don't want to install an extension so let's find out if we need... @@ -151,7 +151,7 @@ LIMIT 1", if ($taskData['assigned_admin'] == '0') { // Assgin current admin to unassgigned task - SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_task_system` SET `assigned_admin`=%s WHERE `id`=%s AND `assigned_admin`=NULL LIMIT 1", + SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_task_system` SET `assigned_admin`=%s WHERE `id`=%s AND `assigned_admin` IS NULL LIMIT 1", array( getCurrentAdminId(), bigintval($taskData['id']) @@ -403,7 +403,7 @@ LIMIT 1", } elseif (isset($postData['delete'])) { // Delete tasks foreach ($postData['sel'] as $taskId => $sel) { - SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_task_system` WHERE `id`=%s AND `assigned_admin` IN (%s,0) LIMIT 1", + SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_task_system` WHERE `id`=%s AND `assigned_admin` IN (%s,0,NULL) LIMIT 1", array(bigintval($taskId), getCurrentAdminId()), __FILE__, __LINE__); } // END - foreach } else {