此代码返回总行数。在哪里我想要用户输入username
和password
的行数。
public boolean logInUser(String un,String pass){
int row;
SQLiteDatabase db = getReadableDatabase();
String query = "SELECT * FROM USER WHERE USERNAME = '" + un + "' AND PASSWORD = '" + pass + "'";
Cursor c = db.rawQuery(query, null);
row=c.getCount();
return row > 0;
}