具有多个条件的SQLite查询

时间:2015-12-01 11:24:56

标签: android sqlite android-sqlite

如何做这样的事情:

"SELECT * FROM table_name WHERE name = ? AND id IN (?, ?, ?)"
//selection: name + " = ? AND " + id + " IN (?, ?, ?)";
//selectionArgs[]: new String[] {"David", "2", "6", "7"});

它不起作用:错误在哪里? 我正在使用:

query(@NonNull Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder)

0 个答案:

没有答案