0
public Cursor ShowBarchartIncome(int yearChoose) {
Cursor cur1=db.rawQuery("SELECT "+COLEXPENSE+" as _id,"+" SUM(PRICE) as price from "+EXPENSETABLE
+" WHERE ("+YEAREX+" = "+2012+") AND ("+MONTHEX+" = 01) AND ("+TYPE+" = 'income')",new String [] {});
return cur1;
}
public class BarGraph {
public Intent getIntent(Context context) {
DBHelper.open();
int spn=editYEAR.getId();
int e = Integer.valueOf(spn);
c = DBHelper.ShowBarchartIncome(e);
startManagingCursor(c);
//data 1
int[] y ={**c.getCount()**,443,443,456,234,123,342,134,123,645,234,274};
CategorySeries series = new CategorySeries("รายรับ");
for(int i=0;i<y.length;i++){
series.add("Bar "+ (i+1),y[i]);
}
}
我無法得到真實的數據和價格將其返回1 int[] y ={c.getCount()}
我想從光標int數據請幫我
我怎樣才能獲得的數據和價格showbarchartincome如果真正的數據是15000
也看到我的最新答案的版本。 – Yury 2012-02-02 11:29:33
謝謝你Yury 我來自泰國 – barmboy 2012-02-02 12:26:13