Laptimes and sectors are now fixed

This commit is contained in:
2023-05-24 15:01:41 +02:00
parent f356d90c35
commit e8028528e0
2 changed files with 13 additions and 12 deletions
+4 -3
View File
@@ -120,7 +120,7 @@ namespace Test_Merge
public List<int> GetSectorsFromLapTime(string driverName,int lap)
{
int driverId = GetDriverID(driverName);
string selectQuery = "SELECT Sector1,Sector2,Sector3 FROM Stats WHERE DriverID = @driverID AND Lap = @Lap";
string selectQuery = "SELECT Sector1,Sector2,Sector3 FROM Stats WHERE DriverID = @driverID AND Lap = @lap";
List<int> result = new List<int>();
using (var command = new SQLiteCommand(selectQuery, Connection))
{
@@ -131,8 +131,9 @@ namespace Test_Merge
SQLiteDataReader reader = command.ExecuteReader();
while (reader.Read())
{
int sectorTime = reader.GetInt32(0);
result.Add(sectorTime);
result.Add(reader.GetInt32(0));
result.Add(reader.GetInt32(1));
result.Add(reader.GetInt32(2));
}
}
catch