Big Bug on Page327, Chapter9
In the low part of this page, the code as following:
goalsFor += Convert.ToInt32(rdr("GoalsFor"))
goalsAgainst += Convert.ToInt32(rdr("GoalsAgainst"))
If goalsFor > goalsAgainst Then
wins += 1
ElseIF goalsFor < goalsAgainst Then
Since goalsFor and goalsAgainst are used to save accumulated scores, how can they be used in comparing every game's win/loss result????
In the first run, the two variables will be 1, 6 accoring to the database, because it is the first record in the database and the initiate value of these two values are zero, it can be used to compare result, but from the second loop, they have the values from the last round, how can you use them to decide the result of the game???
After all, I know the reason why Wrox team is always lossing, that's because the author wants it lose.
I am a database programmer and .Net programmer