Log.e("Thinhdt1", qb.buildQuery(new String[] { "sum(money)" },
"category = ?", new String[] {category}, null, null, null, null));
Cursor mCursor = mDb.query(
"Exchange",
new String[] { "sum(money)" },
"category = ?" ,
new String[] {category},
null,
null,
null
);
登录logcat():SELECT sum(money)FROM Exchange WHERE(category =?)
请找错误帮助我。 谢谢。
答案 0 :(得分:0)
尝试
Cursor mCursor = mDb.query(
"Exchange",
new String[] { "sum(money) as sum" },
"category = ?" ,
new String[] {category},
null,
null,
null
);