开发者

SQLite Beginner Question. Android Content resolver.update(...) insert(...)

Do I explicitly write WH开发者_高级运维ERE clause for insert/updates?

Like so:

cr.update(uri, values, "WHERE _id="+id, null);


Try

String[] args = {String.valueOf(id)};
cr.update(uri, values, Data._ID + "=?", args);


ContentResolver.update()

About the where parameter:

A filter to apply to rows before updating, formatted as an SQL WHERE clause (excluding the WHERE itself).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜