I have snip code:
var keyword = "ninh";
var page = 1;
var pageSize = 10;
var bucketName = "myBucket";
string statement = "SELECT `" + bucketName + "`.* FROM `" + bucketName
+ "` WHERE type = 'myobject'"
+ " AND name LIKE '%$keyword%' AND status <> -1"
+ " LIMIT $limit"
+ " OFFSET $offset";
var query = new QueryRequest(statement)
.AddNamedParameter("$keyword", keyword)
.AddNamedParameter("$offset", page)
.AddNamedParameter("$limit", pageSize);
But query string after AddNamedParameter:
SELECT `myBucket`.* FROM `myBucket` WHERE type = 'myobject' AND name LIKE '%25$keyword%25' AND status <> -1 LIMIT $limit OFFSET $offset&$keyword="ninh"&$offset=1&$limit=10
How can my statement can contain ‘%’ character for condition LIKE?