我尝试从数据库表中选择包含许多条件子句的数据,其中我的代码看起来像
Cursor cursor = sqliteDatabase.rawQuery("SELECT "+
AndroidOpenDbHelper.COLUMN_NAME_FILE_NAME+" FROM " +
AndroidOpenDbHelper.TABLE_FILE + " where "+
AndroidOpenDbHelper.COLUMN_NAME_FILE_CATEGORY+" = "+ category+","+
AndroidOpenDbHelper.COLLUMN_NAME_FILE_THEME+" = "+theme+","+
AndroidOpenDbHelper.COLLUMN_NAME_FILE_DATE_CREATING+"="+date);
我知道这是代码不正确,我该如何纠正呢
答案 0 :(得分:0)
使用一个WHERE并将条件与AND
组合...其中a = 5 AND b = 7 AND c ='Ivan'