SHARE
TWEET

Untitled

Tulus97 Jan 20th, 2020 164 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public Book findOne(String find) {
  2.         SQLiteDatabase db = this.getReadableDatabase();
  3.         Cursor cursor = db.query(TABLE_NAME, new String[]{KEY_NUMBER,
  4.                         KEY_JUDUL, KEY_NOTASI, KEY_TEMA}, KEY_NUMBER + "=?",
  5.                 new String[]{find}, null, null, null, null);
  6.         if (cursor.moveToFirst()) {
  7.             do {
  8.                 Book buku = new Book(cursor.getString(0), cursor.getString(1), cursor.getString(2), cursor.getString(3));
  9.                 return buku;
  10.             }while (cursor.moveToNext());
  11.         }
  12.         cursor.close();
  13.         db.close();
  14.         return null;
  15.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top