From 39bbe9ebd25976e253327dc18717a8777d2edccd Mon Sep 17 00:00:00 2001 From: daitingting Date: Mon, 18 Aug 2025 13:45:03 +0800 Subject: [PATCH] * [task#148413,done,2h] Check space in sql. --- module/action/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/action/model.php b/module/action/model.php index d8cc36c12f..455f0b9db5 100755 --- a/module/action/model.php +++ b/module/action/model.php @@ -1944,7 +1944,7 @@ class actionModel extends model $beginAndEnd = $this->computeBeginAndEnd($period, '', $direction); $hasProduct = preg_match('/t2\.(`?)product/', $condition); - $condition = preg_replace("/AND +`?date`? +(<|>|<=|>=) +'\d{4}\-\d{2}\-\d{2}'/", '', $condition); + $condition = preg_replace("/AND +`?date`?\s?(<|>|<=|>=)\s?'\d{4}\-\d{2}\-\d{2}'/", '', $condition); $actions = $this->dao->select('action.id')->from(TABLE_ACTION)->alias('action') ->beginIF($hasProduct)->leftJoin(TABLE_ACTIONPRODUCT)->alias('t2')->on('action.id=t2.action')->fi() ->where($condition)