Esempio n. 1
0
        /// <summary>
        /// Insertar un jugador en la base de datos.
        /// </summary>
        /// <param name="p">Jugador.</param>
        public void insertPlayer(Player p)
        {
            string sentence = "INSERT INTO Players(name, pwd, avatar, wins, draws, loses) VALUES('" + p.Name + "','" + p.Pwd + "','" + p.Avatar + "'," + p.Wins + "," + p.Draws + "," + p.Loses + ")";

            db.connection();
            db.insert(sentence);
            db.disconnection();
        }