public long addMyRecentRead(Uri uri) { SQLiteDatabase database = myDBHelper.getWritableDatabase(); ContentValues values = new ContentValues(); values.put("book_path", uri.toString()); long id = database.insert("myRecentRead_table", null, values); return id; }
public long addMyRead(String pdfPath, String pageNo, String key) { SQLiteDatabase database = myDBHelper.getWritableDatabase(); ContentValues values = new ContentValues(); values.put("key", key); values.put("book_path", pdfPath); values.put("pageNo", pageNo); long id = database.insert("myRead_table", null, values); return id; }
public int updateMyRead(String pdfPath, String pageNo, String title) { ContentValues values = new ContentValues(); values.put("book_path", pdfPath); values.put("pageNo", pageNo); values.put("title", title); return myDBHelper .getWritableDatabase() .update("myRead_table", values, "book_path=?", new String[] {pdfPath}); }
public boolean getMyRead(String page, String path) { SQLiteDatabase database = myDBHelper.getWritableDatabase(); Cursor cursor = database.query( "myRead_table", null, "pageNo = ? and book_path = ?", new String[] {page, path}, null, null, null); boolean b = cursor.moveToFirst(); cursor.getColumnCount(); cursor.close(); return b; }