public static void Update(MountPark model) { try { MySqlCommand Command = new MySqlCommand() { Connection = DatabaseManager.Provider.getConnection(), CommandText = "REPLACE INTO `mountpark_data` VALUES(@map,@cell,@size,@owner,@guild,@price,@data);", }; Command.Prepare(); Command.Parameters.AddWithValue("@map", model.get_map().Id); Command.Parameters.AddWithValue("@cell", model.get_cellid()); Command.Parameters.AddWithValue("@size", model.get_size()); Command.Parameters.AddWithValue("@owner", model.get_owner()); Command.Parameters.AddWithValue("@guild", (model.get_guild() == null ? -1 : model.get_guild().ID)); Command.Parameters.AddWithValue("@price", model.get_price()); Command.Parameters.AddWithValue("@data", (model.parseData())); Command.ExecuteNonQuery(); } catch (Exception e) { Logger.Error("Can't execute query : " + e.ToString()); } }