public void delete(Integer... ids){
if(ids.length>0){
StringBuffer sb = new StringBuffer();
for(Integer id : ids){
sb.append("?").append(",");
}
sb.deleteCharAt(sb.length() - 1);
dbOpenHelper.getWritableDatabase().execSQL("delete from person where id in ("+sb+")", (Object[])ids);
}
}
看书发现这么个东西
请问这Integer... ids 是声明一个Integer数组么? 用Integer[] 不行么?