mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-07-17 18:16:09 +00:00
refactor: multiple calls to getVSumField() replaced by a single one
#313
This commit is contained in:
@@ -16,10 +16,17 @@ if($_GET['aid'])
|
||||
$aliusers = $database->getAllMember($_GET['aid']);
|
||||
if($alidata and $aliusers)
|
||||
{
|
||||
foreach($aliusers as $member)
|
||||
{
|
||||
$totalpop += $database->getVSumField($member['id'],"pop");
|
||||
} ?>
|
||||
$memberIDs = [];
|
||||
foreach($aliusers as $member) {
|
||||
$memberIDs[] = $member['id'];
|
||||
}
|
||||
$data = $database->getVSumField($memberIDs,"pop");
|
||||
|
||||
if (count($data)) {
|
||||
foreach ($data as $row) {
|
||||
$totalpop += $row['Total'];
|
||||
}
|
||||
} ?>
|
||||
|
||||
<br>
|
||||
<table id="profile" cellpadding="1" cellspacing="1">
|
||||
|
||||
Reference in New Issue
Block a user