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(); }
public void delete(User user) { SQLiteDatabase db = helper.getWritableDatabase(); db.execSQL("delete from loginuser where uid=?", new String[] {user.getUid()}); }