0
public Cursor getChart(String sign) {
return db.query(CHART_TABLE, new String[] {
KEY_CHART_ID,
KEY_SIGN,
KEY_TOTAL },
KEY_SIGN + "=" + sign,
null, null, null, null, null);
}
05-09 17:14:39.260: ERROR/AndroidRuntime(14935): android.database.sqlite.SQLiteException: near "+": syntax error: , while compiling: SELECT _id, sign, total FROM ChartTable WHERE sign=+
「WHERE sign = +」和「do」錯誤.. – Mikaveli 2011-05-09 10:20:10
我該怎麼解決它? – user65544 2011-05-09 10:21:28
作爲第一通KEY_SIGN + 「= '」 +符號+ 「'」, – Mikaveli 2011-05-09 10:23:30