Ejemplo n.º 1
0
        public static void UpdateUsers(InfChest chest)
        {
            string query = $"UPDATE InfChests3 SET Users = '{chest.UsersToString()}' WHERE ID = {chest.id};";

            db.Query(query);
        }
Ejemplo n.º 2
0
        public static void AddChest(InfChest chest)
        {
            string query = $"INSERT INTO InfChests3 (UserID, X, Y, Items, Public, Users, Groups, Refill, WorldID) VALUES ({chest.userid}, {chest.x}, {chest.y}, '{chest.ItemsToString()}', {(chest.isPublic ? 1 : 0)}, '{chest.UsersToString()}', '{chest.GroupsToString()}', {chest.refill}, {Main.worldID});";

            db.Query(query);
        }