From 253cad35ef030bbe69c2d783aeacc5ed8e5818c6 Mon Sep 17 00:00:00 2001 From: hoteas Date: Thu, 18 Aug 2022 13:28:02 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=BA=93=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E6=93=8D=E4=BD=9C=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/hotimedb.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/db/hotimedb.go b/db/hotimedb.go index 1385653..fa86736 100644 --- a/db/hotimedb.go +++ b/db/hotimedb.go @@ -665,11 +665,13 @@ func (that *HoTimeDB) Select(table string, qu ...interface{}) []Map { data := ObjToSlice(qu[intQs]) for i := 0; i < len(data); i++ { k := data.GetString(i) - if strings.Contains(k, " AS ") { + if strings.Contains(k, " AS ") || + strings.Contains(k, ".") { query += " " + k + " " } else { + query += " `" + k + "` " }