From c8a9038efebf11b92ff9c7d8f49b4d91fea304a7 Mon Sep 17 00:00:00 2001 From: hoteas <等> Date: Fri, 27 May 2022 15:00:44 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=BA=93where=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0[##]=E6=93=8D=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/hotimedb.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/db/hotimedb.go b/db/hotimedb.go index 442e36d..b206f2a 100644 --- a/db/hotimedb.go +++ b/db/hotimedb.go @@ -711,6 +711,9 @@ func (that *HoTimeDB) varCond(k string, v interface{}) (string, []interface{}) { k = "`" + k + "`" } where += " " + k + "=" + ObjToStr(v) + case "[##]": //直接添加value到sql,需要考虑防注入,value比如:"a>b" + + where += " " + ObjToStr(v) case "[#!]": k = strings.Replace(k, "[#!]", "", -1) if !strings.Contains(k, ".") {