数据库错误操作优化

This commit is contained in:
hoteas 2022-08-18 13:28:02 +08:00
parent 47c8736f34
commit 253cad35ef

View File

@ -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 + "` "
}