我想从 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);
}