Ejemplo n.º 1
0
 public static AccountRecord ReturnAccountWithTicket(string ticket)
 {
     lock (DatabaseManager.Object)
     {
         AccountRecord   account = null;
         MySqlDataReader reader  = DatabaseManager.ExecuteQuery($"SELECT * FROM accounts WHERE Ticket = '{ticket}' LIMIT 1");
         if (reader.Read())
         {
             account = new AccountRecord(reader);
         }
         reader.Close();
         return(account);
     }
 }
Ejemplo n.º 2
0
 public static AccountRecord ReturnAccount(int id)
 {
     lock (DatabaseManager.Object)
     {
         AccountRecord   account = null;
         MySqlDataReader reader  = DatabaseManager.ExecuteQuery($"SELECT * FROM accounts WHERE Id = '{id}' LIMIT 1");
         if (reader.Read())
         {
             account = new AccountRecord(reader);
         }
         reader.Close();
         return(account);
     }
 }