public void ShowFirstFiveHighScore()
{
string query = "SELECT 'key', 'PlayerName', 'HighScore' FROM PlayerPoints ORDER BY HighScore DESC LIMIT 5";
if (this.OpenConnection() == true)
{
MySqlCommand cmd = new MySqlCommand(query, _connection);
MySqlDataReader reader = cmd.ExecuteReader();
while (reader.Read())
{
MessageBox.Show(reader.GetString(...);
}
cmd.ExecuteNonQuery();
this.CloseConnection();
}
}
我尝试显示列“PlayerName”和“HighScore”。也许在 MessageBox 中?有什么帮助吗?谢谢。