// Define a projection that specifies which columns from the database
// you will actually use after this query.
String[]projection={
@ -130,9 +131,15 @@ public class LogUtil {
selectionArgList.add(String.valueOf(id));
}
if(type!=null){
// Define 'where' part of query.
selection+=" and "+LogTable.LogEntry.TABLE_NAME+"."+LogTable.LogEntry.COLUMN_NAME_TYPE+" = ? ";
selectionArgList.add(type);
}
if(key!=null){
// Define 'where' part of query.
selection=" and ("+LogTable.LogEntry.TABLE_NAME+"."+LogTable.LogEntry.COLUMN_NAME_FROM+" LIKE ? or "+LogTable.LogEntry.TABLE_NAME+"."+LogTable.LogEntry.COLUMN_NAME_CONTENT+" LIKE ? ) ";
selection+= " and ("+LogTable.LogEntry.TABLE_NAME+"."+LogTable.LogEntry.COLUMN_NAME_FROM+" LIKE ? or "+LogTable.LogEntry.TABLE_NAME+"."+LogTable.LogEntry.COLUMN_NAME_CONTENT+" LIKE ? ) ";