此代码有效:
Cursor cursor=database.rawQuery("SELECT * FROM "+dbHelper.TABLE_NAME+" where `" +
dbHelper.MyShifts_Month + "`=" + month ,null);
这并不是:
Cursor cursor=database.rawQuery("SELECT * FROM "+dbHelper.TABLE_NAME+" where `" +
dbHelper.MyShifts_Month + "`=" + month + " and " + dbHelper.MyShifts_year + "`=" + year,null);
我该如何写" AND"正确的,以使其工作?
答案 0 :(得分:2)
似乎缺少单引号,它应该是“和`”