Пример #1
0
 public void updateLoginUserInfo(User user) {
   SQLiteDatabase db = helper.getWritableDatabase();
   ContentValues values = new ContentValues();
   values.put(LoginUserTable.AVATAR, user.getAvatar());
   values.put(LoginUserTable.UNAME, user.getUname());
   db.update(LoginUserTable.TABLE_NAME, values, "uid=?", new String[] {user.getUid()});
   db.close();
 }
Пример #2
0
 public void delete(User user) {
   SQLiteDatabase db = helper.getWritableDatabase();
   db.execSQL("delete from loginuser where uid=?", new String[] {user.getUid()});
 }