数据库where增加[##]操作

This commit is contained in:
hoteas 2022-05-27 15:00:44 +08:00
parent b638d8bd65
commit c8a9038efe

View File

@ -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, ".") {