我的问题是关于如何得到一个表的最大ID行MAX ID行......我使用最多的功能,但给我一个错误找张桌子
这里是我的代码
public static long getLastIdQuotaAdded(Context context){
long id;
Cursor cursor;
String selection = null;
String[] selectionArgs = null;
selection = "MAX(" + C_ID + ")";
cursor=context.getContentResolver().query(URI, ALL_COLUMNS, selection, selectionArgs, null);
id = cursor.getLong(cursor.getColumnIndex(C_ID));
return id;
}
谢谢你YOUT帮助... :)
你可以复制/过去的错误?你的照片在中间被切断... – florianmski