public int updatePage(ViewItem item) {
    SQLiteDatabase db = this.getWritableDatabase();

    ContentValues values = new ContentValues();
    values.put("chapterUrl", item.getChapterUrl());
    values.put("imageUrl", item.getImageUrl());
    values.put("fileUrl", item.getFileUrl());
    values.put("stt", item.getOrder());

    // updating row
    return db.update(TABLE_PAGE, values, "chapterUrl = ?", new String[] {item.getChapterUrl()});
  }
  public long createPage(ViewItem item) {
    SQLiteDatabase db = this.getWritableDatabase();

    ContentValues values = new ContentValues();
    values.put("chapterUrl", item.getChapterUrl());
    values.put("imageUrl", item.getImageUrl());
    values.put("fileUrl", item.getFileUrl());
    values.put("stt", item.getOrder());

    // insert row
    long inserted_id = db.insert(TABLE_PAGE, null, values);

    return inserted_id;
  }