public NhlStatsSet.goaliestatsDataTable GetGoaliesEx(String entry, long seasonId, bool top, String filter) { System.Console.WriteLine("querya"); NhlStatsSet.goaliestatsDataTable table = new NhlStatsSet.goaliestatsDataTable(); SQLiteCommand command = new SQLiteCommand(); command.Connection = connection; command.CommandText = String.Format( "SELECT {2} as therequestedstat, GoalieName, Season_ID FROM goaliestats " + "WHERE goaliestats.Season_ID = {0} {1} ORDER BY therequestedstat {3} LIMIT 50", seasonId, filter.Length > 0 ? "AND (" + filter + ")" : "", entry, top ? "DESC" : "ASC"); SQLiteDataAdapter adapter = new SQLiteDataAdapter(command); adapter.Fill(table); System.Console.WriteLine("queryb"); return table; }
public NhlStatsSet.goaliestatsDataTable GetEntireGoalies(String entry, bool top, bool playoffs) { NhlStatsSet.goaliestatsDataTable table = new NhlStatsSet.goaliestatsDataTable(); SQLiteCommand command = new SQLiteCommand(); command.Connection = connection; command.CommandText = String.Format( "SELECT * FROM goaliestats INNER JOIN seasons ON goaliestats.Season_ID = seasons.Season_ID " + "WHERE seasons.Playoffs = '{2}' ORDER BY [{0}] {1} LIMIT 5", entry, top ? "DESC" : "ASC", playoffs ? "1" : "0"); SQLiteDataAdapter adapter = new SQLiteDataAdapter(command); adapter.Fill(table); return table; }