今年の pro_price から合計金額を照会したい.. sqlite クエリステートメント getDate().endWith(getThisYear()) に何か問題がありますか?
public double SumPriceYear(){
Cursor sum = ourDatabase.rawQuery("SELECT SUM( " + Pro_Price + " ) FROM "+ TABLE_NAME + " Where " + Pro_Date + " = '" + getDate().endsWith(getThisYear()) + "' ", null);
if(sum.moveToFirst())
{
return sum.getDouble(0);
}
return sum.getDouble(0);
}