關於SQLITE的問題
小弟最近寫專題碰到了一些問題
以上網爬文,也有翻書.
想問就是
如何讀取到某一行的值,
我要把它加總起來,
然後顯示在TextView上
像這種!!!不過小弟我看不太懂= =
cursor.moveToFirst(); //將指標移至第一筆資料 for(int i=0; i<rows_num; i++) { int id = cursor.getInt(0); //取得第0欄的資料,根據欄位type使用適當語法 String name = cursor.getString(1); int value = cursor.getInt(2); cursor.moveToNext(); //將指標移至下一筆資料 }
是否有大大可以幫我解惑,謝謝










![[新品] 手滑給個噓請別見怪,因為我用了這個…](https://www.iarticlesnet.com/pub/img/article/23232/1403929414151_xs.jpg)
![[有趣] 這個外星看護...會不會一下就被狗狗給推倒了.....](https://www.iarticlesnet.com/pub/img/article/23236/1403929418926_xs.jpg)




![[15 4] iPhone iPad 限時免費及減價 Apps 精選推介](https://www.iarticlesnet.com/pub/img/article/1499/1403768087514_s.jpg)


