时间:2021-07-01 10:21:17 帮助过:23人阅读
string sql = Select Count(ID) As rcount From tbArticle WHERE classID IN( + ids + ) AND Title LIKE @Title ; 参数: SQLiteParameter[] sps = new SQLiteParameter[1]; sps[0] = SQLite.CreateParameter(@Title, DbType.String, % + title + %, 50, Par
string sql = “Select Count(ID) As rcount From tbArticle WHERE classID IN(” + ids + “) AND Title LIKE @Title “;
参数:
SQLiteParameter[] sps = new SQLiteParameter[1];
sps[0] = SQLite.CreateParameter(“@Title”, DbType.String, “%” + title + “%”, 50, ParameterDirection.Input);
就是在变量里直接模拟成 ‘%test%’ ,把这个传递进去,就可以查出结果了