mirror of
https://github.com/islehorse/HISP.git
synced 2025-04-23 21:25:52 +12:00
fix bugs
This commit is contained in:
parent
de9dfaf362
commit
91fd5820ab
2 changed files with 7 additions and 7 deletions
|
@ -1716,7 +1716,7 @@ namespace HISP.Server
|
|||
{
|
||||
db.Open();
|
||||
MySqlCommand sqlCommand = db.CreateCommand();
|
||||
sqlCommand.CommandText = "SELECT * FROM leaderboards WHERE playerId=@playerId ORDER BY score ASC";
|
||||
sqlCommand.CommandText = "SELECT * FROM leaderboards WHERE playerId=@playerId ORDER BY score DESC";
|
||||
sqlCommand.Parameters.AddWithValue("@playerId", playerId);
|
||||
sqlCommand.Prepare();
|
||||
MySqlDataReader reader = sqlCommand.ExecuteReader();
|
||||
|
@ -1747,7 +1747,7 @@ namespace HISP.Server
|
|||
{
|
||||
db.Open();
|
||||
MySqlCommand sqlCommand = db.CreateCommand();
|
||||
sqlCommand.CommandText = "SELECT * FROM leaderboards WHERE minigame=@gameTitle ORDER BY score ASC LIMIT @limit";
|
||||
sqlCommand.CommandText = "SELECT * FROM leaderboards WHERE minigame=@gameTitle ORDER BY score DESC LIMIT @limit";
|
||||
sqlCommand.Parameters.AddWithValue("@gameTitle", gameTitle);
|
||||
sqlCommand.Parameters.AddWithValue("@limit", limit);
|
||||
sqlCommand.Prepare();
|
||||
|
@ -1779,7 +1779,7 @@ namespace HISP.Server
|
|||
|
||||
db.Open();
|
||||
MySqlCommand sqlCommand = db.CreateCommand();
|
||||
sqlCommand.CommandText = "SELECT DISTINCT score FROM leaderboards WHERE minigame=@gameTitle ORDER BY score ASC";
|
||||
sqlCommand.CommandText = "SELECT DISTINCT score FROM leaderboards WHERE minigame=@gameTitle ORDER BY score DESC";
|
||||
sqlCommand.Parameters.AddWithValue("@gameTitle", gameTitle);
|
||||
sqlCommand.Prepare();
|
||||
MySqlDataReader reader = sqlCommand.ExecuteReader();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue