こんにちはすべての助けに感謝します! は、私は私のデータベーステーブル内の3つのフィールド整数配列を返すSQLiteクエリデータ
public static final String colExpID = "ExpenseID";
public static final String colExpExpense = "ExpenseDisc";
public static final String colExpAmount = "Amount";
データ
public Integer[] queryHouse() {
// TODO Auto-generated method stub
String[] columns = new String[]{colExpID,colExpExpense,colExpAmount};
Integer[] Result = new Integer[]{};
Cursor c = ourDatabase.query(ExpenseTable, columns, null, null, null, null, null);
int iExpense = c.getColumnIndex(colExpExpense);
int iAmount = c.getColumnIndex(colExpAmount);
for(int i = 0; i < c.getCount();i++){
if(c.getString(iExpense) == "House"){
Result[i] = Integer.parseInt(c.getString(iAmount));
}
}
return Result;
}
を照会する私の方法私は私はあなたに感謝欠けているかわからないんだけどを持っています!
あなたはそれはあなたが達成しようとしている、とあなたはそれで失敗しているかが何であるかを指定していないので、私は、またあなたが欠落しているかわからないんだけど。 – SWeko