How to batch update datas in ContentProvider,something confused me

自作多情 提交于 2019-12-08 08:24:45

问题


How can i execute this sql in content Provider as below:

update dtrips set dtp_day_idx=dtp_day_idx+2 where tp_id=1

Can anyone help me fix the code

    DTrip dTrip = new DTrip();
    ContentValues values = createContentValues(dTrip);
    values.put("dtp_day_idx" ,...);
    String select ="tp_id="+tripId;
    mContentResolver.update(UsersColumns.CONTENT_URI, values, select, null);

Thanks.

来源:https://stackoverflow.com/questions/9155395/how-to-batch-update-datas-in-contentprovider-something-confused-me

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!