Leser: 3
|< 1 ... 4 5 6 7 8 >| | 72 Einträge, 8 Seiten |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
$VAR1 = {
'' => {
'use_browser' => undef,
'AddressPort' => undef,
'switch_admins' => undef,
'minplayers' => undef,
'act_players' => '0',
'bombs_defused' => '0',
'serverId' => '2',
'player_admin_command' => undef,
'map_changes' => '0',
'map_ct_wins' => '0',
'address' => '127.0.0.1',
'kills' => '0',
'max_players' => '0',
'bombs_planted' => '0',
'skill_mode' => undef,
'Admins' => undef,
'suicide_penalty' => undef,
'map_ts_shots' => '0',
'map_rounds' => '0',
'name' => 'test',
'map_ct_shots' => '0',
'port' => '27015',
'publicaddress' => undef,
'ba_enabled' => undef,
'map_ts_wins' => '0',
'ts_shots' => '0',
'ts_hits' => '0',
'ignore_bots' => undef,
'auto_ban' => undef,
'broadcasting_command' => undef,
'rounds' => '0',
'broadcasting_player_actions' => undef,
'player_command_osd' => undef,
'suicides' => '0',
'ct_shots' => '0',
'players' => '0',
'public_commands' => undef,
'contact' => undef,
'show_stats' => undef,
'map_ct_hits' => '0',
'player_command_steamid' => undef,
'player_command' => undef,
'min_players_rank' => undef,
'broadcasting_serverdata' => undef,
'ct_hits' => '0',
'broadcasting_command_announce' => undef,
'map_ts_hits' => '0',
'track_server_load' => undef,
'tk_penalty' => undef,
'player_events' => undef,
'broadcasting_command_steamid' => undef,
'ts_wins' => '0',
'hlstats_url' => undef,
'broadcasting_events' => undef,
'headshots' => '0',
'game_type' => undef,
'game' => 'css',
'rcon_password' => 'fuckyou',
'ct_wins' => '0',
'map_started' => '0',
'broadcasting_server_interval' => undef,
'statusurl' => undef,
'act_map' => undef,
'mod' => undef
},
'84.254.65.145:27030' => {
'use_browser' => '0',
'AddressPort' => '84.254.65.145:27030',
'switch_admins' => '0',
'minplayers' => '2',
'act_players' => '2',
'bombs_defused' => '22',
'serverId' => '1',
'player_admin_command' => '',
'map_changes' => '106',
'map_ct_wins' => '11',
'address' => '84.254.65.145',
'kills' => '7185',
'max_players' => '20',
'bombs_planted' => '51',
'skill_mode' => '0',
'Admins' => '0',
'suicide_penalty' => '5',
'map_ts_shots' => '444',
'map_rounds' => '18',
'name' => 'No Escape | Tick 100 | War and Public | Server',
'map_ct_shots' => '425',
'port' => '27030',
'publicaddress' => '',
'ba_enabled' => '0',
'map_ts_wins' => '7',
'ts_shots' => '57435',
'ts_hits' => '10440',
'ignore_bots' => '1',
'auto_ban' => '0',
'broadcasting_command' => 'ma_hlx_psa',
'rounds' => '2733',
'broadcasting_player_actions' => '1',
'player_command_osd' => 'ma_hlx_msa',
'suicides' => '248',
'ct_shots' => '59597',
'players' => '411',
'public_commands' => '1',
'contact' => 'webmaster@battle-stats55.de',
'show_stats' => '1',
'map_ct_hits' => '102',
'player_command_steamid' => '1',
'player_command' => 'ma_hlx_psa',
'min_players_rank' => '0',
'broadcasting_serverdata' => '7',
'ct_hits' => '10378',
'broadcasting_command_announce' => 'ma_hlx_csa',
'map_ts_hits' => '81',
'track_server_load' => '1',
'tk_penalty' => '50',
'player_events' => '1',
'broadcasting_command_steamid' => '1',
'ts_wins' => '1485',
'hlstats_url' => 'http://test2.battle-stats55.de',
'broadcasting_events' => '1',
'headshots' => '2919',
'game_type' => '0',
'game' => 'css',
'rcon_password' => 'stein',
'ct_wins' => '1248',
'map_started' => '1194450974',
'broadcasting_server_interval' => '200',
'statusurl' => undef,
'act_map' => 'cs_italy',
'mod' => 'MANI'
}
};
1 2 3 4 5 6 7 8 9 10 11 12 13 14
my $query = " SELECT * FROM hlstats_Servers "; my $sth = &doQuery($query); while (my $row = $sth->fetchrow_hashref()) { $g_config_servers{ $row->{AddressPort} } = $row; } use Data::Dumper; print Dumper \%g_config_servers;
H3llGhost+2007-11-07 17:10:14--Ich möchte gerne das Ergebnis aus dem MySQL-Query genauso wie das hier in der %g_config_servers speichern.
Nur ich weiß nicht genau wie ich das mit einer Schleife mache ...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
$VAR1 = {
'77.237.250.200:27015' => {
'AddressPort' => '77.237.250.200:27015',
'MinPlayers' => '2',
'MasterServerData' => '7',
'PlayerEventsCommand' => 'ma_hlx_psay',
'BroadCastEventsCommandAnnounce' => 'ma_hlx_csay',
'Mod' => 'MANI',
'MinimumPlayersRank' => '0',
'AdminContact' => 'webmaster@battle55-stats.de',
'BroadCastEvents' => '1',
'AutoTeamBalance' => '0',
'SwitchAdmins' => '0',
'EnablePublicCommands' => '1',
'GameType' => '0',
'BroadCastPlayerActions' => '1',
'BroadCastEventsCommandSteamid' => '1',
'PlayerEvents' => '1',
'BroadCastEventsCommand' => 'ma_hlx_psay',
'SkillMode' => '0',
'AutoBanRetry' => '0',
'PlayerEventsCommandSteamid' => '1',
'TrackServerLoad' => '1',
'ShowStats' => '1',
'PlayerEventsCommandOSD' => 'ma_hlx_msay',
'TKPenalty' => '50',
'HLStatsURL' => 'http://test3.battle55-stats.de',
'SuicidePenalty' => '5',
'MasterServerInterval' => '200',
'IgnoreBots' => '1',
'DisplayResultsInBrowser' => '0'
}
};
1 2 3 4 5 6 7 8 9 10 11 12 13 14
my $query = " SELECT * FROM hlstats_Servers "; my $sth = &doQuery($query); while (my $row = $sth->fetchrow_hashref()) { if ($row->{AddressPort} != "") { $g_config_servers{ $row->{AddressPort} } = $row; } }
Quote[...] ob die Daten so aussehen, wie du dir das erwartest, ob die Schleife entsprechend durchlaufen wird usw.?
|< 1 ... 4 5 6 7 8 >| | 72 Einträge, 8 Seiten |