select like
This commit is contained in:
parent
0317dc9f5e
commit
386a55fcfa
@ -90,14 +90,14 @@ func (this *dbPool) SelectLike(
|
||||
fields []string,
|
||||
whereKv [][]string,
|
||||
likeWhere [][]string,
|
||||
start int64,
|
||||
limit int,
|
||||
cb QueryResultCb) {
|
||||
var params []string
|
||||
|
||||
sql := fmt.Sprintf("SELECT %s FROM %s WHERE 1=1 ", this.joinSelectFields(fields), tblName)
|
||||
sql := fmt.Sprintf("SELECT %s FROM %s WHERE idx > %d", this.joinSelectFields(fields), tblName, start)
|
||||
this.joinWhere(&sql, ¶ms, whereKv)
|
||||
this.joinWhereLike(&sql, ¶ms, likeWhere)
|
||||
sql = fmt.Sprintf("%s LIMIT %d", sql, limit)
|
||||
sql = fmt.Sprintf("%s ORDER BY idx ASC LIMIT %d", sql, limit)
|
||||
|
||||
this.internalQuery(dataSource, sql, params, cb)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user