标签:os 使用 java 数据 sp c 问题 on 代码
int sum(SQLiteDatabase db) { Cursor cursor = db.rawQuery("select sum(e) from a", null); cursor.moveToNext(); int sum = cursor.getInt(0); cursor.close(); return sum; }
int sum() { SQLiteDatabase db = dbManger.getInstance(); Cursor cursor = db.rawQuery("select sum(e) from a", null); cursor.moveToNext(); int sum = cursor.getInt(0); cursor.close(); db.close(); return sum; }
标签:os 使用 java 数据 sp c 问题 on 代码
原文地址:http://www.cnblogs.com/lianxu61/p/4011055.html