public Cursor getImages(long rowId) throws SQLException { Cursor mCursor = db.rawQuery(\"select * from Pictures WHERE id=\" + rowId + \";
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. I hope it helps you.