发布网友 发布时间:2022-05-04 13:13
共2个回答
懂视网 时间:2022-05-04 17:35
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%’ ,把这个传递进去,就可以查出结果了
热心网友 时间:2022-05-04 14:43
string sql = “Select Count(ID) As rcount From tbArticle WHERE classID IN(” + ids + “) AND Title LIKE @Title “;