This commit is contained in:
hoteas 2018-07-30 18:22:50 +00:00
parent d0c374f34e
commit d7d7227ad8

2
db.go
View File

@ -632,7 +632,7 @@ func (this *HoTimeDB) varCond(k string, v interface{}) (string, []interface{}) {
where += "`" + k + "` LIKE ? " where += "`" + k + "` LIKE ? "
v = "%" + ObjToStr(v) v = "%" + ObjToStr(v)
res = append(res, v) res = append(res, v)
case "[!~]"://右边任意 case "[~!]"://右边任意
k = strings.Replace(k, "[~]", "", -1) k = strings.Replace(k, "[~]", "", -1)
where += "`" + k + "` LIKE ? " where += "`" + k + "` LIKE ? "
v = ObjToStr(v) +"%" v = ObjToStr(v) +"%"