{0}問題
.apply("select * from table where name '{0}%'","") 這樣的怎么解決
.inSql("id","(select id from table where name like '網(wǎng)%')")這樣的語句 參數(shù)網(wǎng)能否使用{0}形式解決
.apply("select * from table where name '{0}%'","") 這樣的怎么解決
.inSql("id","(select id from table where name like '網(wǎng)%')")這樣的語句 參數(shù)網(wǎng)能否使用{0}形式解決
2020-02-22
舉報(bào)
2020-02-22
inSql中不可以使用{0}這種形式。
使用apply,你是不是要實(shí)現(xiàn)id in (select id from table where name like '網(wǎng)%')這樣的sql呢。
你可以這樣寫
你可以試試看,這個(gè)是不是你想要的結(jié)果。
2020-02-24
謝謝明白了,我的意思是就是問像 '{0}%' 這樣的怎么傳參數(shù),就是沒想到把%放到外面。