Leser: 3
|< 1 2 3 4 ... 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
Servers[0] = ("AddressPort" => "xxx.xxx.xxx.xxx:xxxxx",
"MinPlayers" => "6",
"AdminContact" => "webmaster@battle55-stats.de",
"HLStatsURL" => "http://www.battle55-stats.de",
"DisplayResultsInBrowser" => "0",
"MasterServerData" => "7",
"MasterServerInterval" => "200",
"BroadCastEvents" => "0",
"BroadCastPlayerActions" => "0",
"BroadCastEventsCommand" => "say",
"BroadCastEventsCommandSteamid" => "0",
"BroadCastEventsCommandAnnounce" => "say",
"PlayerEvents" => "1",
"PlayerEventsCommand" => "say",
"PlayerEventsCommandSteamid" => "0",
"PlayerEventsCommandOSD" => "",
"PlayerEventsAdminCommand" => "",
"ShowStats" => "1",
"TKPenalty" => "50",
"SuicidePenalty" => "5",
"AutoTeamBalance" => "0",
"AutoBanRetry" => "0",
"TrackServerLoad" => "1",
"MinimumPlayersRank" => "0",
"Admins" => "",
"SwitchAdmins" => "0",
"IgnoreBots" => "1",
"SkillMode" => "0",
"GameType" => "0",
"EnablePublicCommands" => "1",
"Mod" => "")
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
my $query = " SELECT serverId, game, name, rcon_password, publicaddress FROM hlstats_Servers WHERE address='$address' AND port='$port' "; my $result = &doQuery($query); my $hash_ref; while ($hash_ref = $dbh->selectrow_hashref($result)) { Servers[$hash_ref->{'serverId'}] = $$hash_ref; }
1 2 3 4 5
# mit jedem Durchlauf gibt es eine neue Variable $hash_ref mit eigener Speicheradresse while ( my $hash_ref = $dbh->selectrow_hashref( $result ) ) { # $hash_ref nicht dereferenzieren, weil wir einen AoH aufbauen; perldoc perldsc $Servers[ $hash_ref->{'serverID'} ] = $hash_ref; }
|< 1 2 3 4 ... 8 >| | 72 Einträge, 8 Seiten |