public List <SearchLogResultItem> select(SearchLogItem logItem0, SqlCommand cmd0) { cmd0.CommandText = "SELECT * FROM " + tableName + " " + TABLE_NAME_ABBR + " INNER JOIN " + DB_EpgEventInfo.TABLE_NAME + " " + DB_EpgEventInfo.TABLE_NAME_ABBR + " ON (" + TABLE_NAME_ABBR + "." + COLUMN_epgEventInfoID + "=" + DB_EpgEventInfo.TABLE_NAME_ABBR + "." + DB_EpgEventInfo.COLUMN_ID + ")" + " WHERE " + TABLE_NAME_ABBR + "." + COLUMN_searchLogID + "=" + logItem0.ID + " ORDER BY " + DB_EpgEventInfo.TABLE_NAME_ABBR + "." + DB_EpgEventInfo.COLUMN_start_time; List <SearchLogResultItem> itemList1 = new List <SearchLogResultItem>(); using (SqlDataReader reader1 = cmd0.ExecuteReader()) { while (reader1.Read()) { int i1 = 0; SearchLogResultItem resutItem1 = getItem(reader1, ref i1); resutItem1.epgSearchKeyInfo = logItem0.epgSearchKeyInfoS; resutItem1.epgEventInfoR = _db_EpgEventInfo.getItem(reader1, ref i1); if (!resutItem1.epgEventInfoR.isBroadcasted()) // 放送終了? { itemList1.Add(resutItem1); } } } return(itemList1); }