数据库where增加[##]操作
This commit is contained in:
parent
b638d8bd65
commit
c8a9038efe
@ -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, ".") {
|
||||
|
Loading…
Reference in New Issue
Block a user