如何添加带有两个值android的where子句

时间:2016-05-11 22:30:43

标签: android sqlite

我想在哪里检查密码

    public Cursor signincheck(String email,String Password) {
        SQLiteDatabase db=this.getWritableDatabase();

        String query="SELECT * FROM " + TABLE_NAME + " WHERE EMAIL = '" + email + "'";

        Cursor cursor=db.rawQuery(query, null);
        return cursor;

    }

1 个答案:

答案 0 :(得分:0)

只需使用AND

String query="SELECT * FROM " + TABLE_NAME + " WHERE EMAIL = '" + email + "' AND SECOND_FIELD = '" + your_value_here + "'" ;