From 098d025c566637e154e22f804d849b189c99acee Mon Sep 17 00:00:00 2001 From: liugang Date: Thu, 28 Sep 2023 09:21:11 +0800 Subject: [PATCH] * testtaskModel: enclose the value in the dao query condition in single quotes. --- module/testtask/model.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/module/testtask/model.php b/module/testtask/model.php index 103ad1fb26..b0b68d41fa 100755 --- a/module/testtask/model.php +++ b/module/testtask/model.php @@ -573,7 +573,7 @@ class testtaskModel extends model $datas = $this->dao->select('t2.type AS name, COUNT(*) AS value')->from(TABLE_TESTRUN)->alias('t1') ->leftJoin(TABLE_CASE)->alias('t2')->on('t1.case = t2.id') ->where('t1.task')->eq($taskID) - ->andWhere('t2.deleted')->eq(0) + ->andWhere('t2.deleted')->eq('0') ->groupBy('t2.type') ->orderBy('value desc') ->fetchAll('name'); @@ -597,7 +597,7 @@ class testtaskModel extends model $datas = $this->dao->select('t2.module AS name, COUNT(*) AS value')->from(TABLE_TESTRUN)->alias('t1') ->leftJoin(TABLE_CASE)->alias('t2')->on('t1.case = t2.id') ->where('t1.task')->eq($taskID) - ->andWhere('t2.deleted')->eq(0) + ->andWhere('t2.deleted')->eq('0') ->groupBy('t2.module') ->orderBy('value desc') ->fetchAll('name'); @@ -622,7 +622,7 @@ class testtaskModel extends model $datas = $this->dao->select('t1.lastRunner AS name, COUNT(*) AS value')->from(TABLE_TESTRUN)->alias('t1') ->leftJoin(TABLE_CASE)->alias('t2')->on('t1.case = t2.id') ->where('t1.task')->eq($taskID) - ->andWhere('t2.deleted')->eq(0) + ->andWhere('t2.deleted')->eq('0') ->groupBy('t1.lastRunner') ->orderBy('value DESC') ->fetchAll('name'); @@ -957,7 +957,7 @@ class testtaskModel extends model ->leftJoin(TABLE_CASE)->alias('t2')->on('t1.case = t2.id') ->leftJoin(TABLE_STORY)->alias('t3')->on('t2.story = t3.id') ->where('t1.task')->eq((int)$taskID) - ->andWhere('t2.deleted')->eq(0) + ->andWhere('t2.deleted')->eq('0') ->andWhere('t2.id')->in(array_keys($cases)) ->orderBy($orderBy) ->page($pager) @@ -1007,7 +1007,7 @@ class testtaskModel extends model ->leftJoin(TABLE_STORY)->alias('t3')->on('t2.story = t3.id') ->where('t1.task')->eq((int)$taskID) ->andWhere('t1.assignedTo')->eq($user) - ->andWhere('t2.deleted')->eq(0) + ->andWhere('t2.deleted')->eq('0') ->beginIF($modules)->andWhere('t2.module')->in($modules)->fi() ->orderBy($orderBy) ->page($pager)