我有一个两列数据的 sqlite3 数据库。我在数据库上执行了以下查询。它适用于字符串单词。我如何将单词数组(单词 [i])传递给 gettestdata 以在数据库上执行查询
public Cursor getTestData(word)
{
try
{
String sql ="SELECT suggest_text_2 FROm FTSdictionary WHERE suggest_text_1='"+word+"'";
Log.v("Query",sql );
Cursor mCur = mDb.rawQuery(sql, null);
if (mCur!=null)
{
mCur.moveToNext();
}
return mCur;
}
catch (SQLException mSQLException)
{
Log.e(TAG, "getTestData >>"+ mSQLException.toString());
throw mSQLException;
}
}