Cursor c = db.rawQuery("select username from user_information where username ='" + username_txt.getText() + "'", null);
c.moveToFirst();
if (c.moveToFirst()) {
username = c.getString(c.getColumnIndex("username"));
}
Use this. Hope this helps you.
user4120685
source
share