fixed from error
This commit is contained in:
@@ -8,6 +8,7 @@ class Members extends Renderer {
|
|||||||
$tableBody = '<tbody>';
|
$tableBody = '<tbody>';
|
||||||
foreach ($members as $row) {
|
foreach ($members as $row) {
|
||||||
$tableBody .= '<tr>'
|
$tableBody .= '<tr>'
|
||||||
|
. '<td>' . $row['id'] . '</td>'
|
||||||
. '<td>' . $row['last_name'] . ', ' . $row['first_name'] . '</td>'
|
. '<td>' . $row['last_name'] . ', ' . $row['first_name'] . '</td>'
|
||||||
. '<td>' . $row['email'] . '</td>'
|
. '<td>' . $row['email'] . '</td>'
|
||||||
. '<td>' . $row['last_payment'] . '</td>'
|
. '<td>' . $row['last_payment'] . '</td>'
|
||||||
|
|||||||
@@ -541,9 +541,9 @@ class Renderer {
|
|||||||
return $decoded;
|
return $decoded;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getMemberList(): array {
|
protected function getMemberList(bool $withId = false): array {
|
||||||
$query = <<<queryend
|
$query = <<<queryend
|
||||||
SELECT c.first_name, c.last_name , c.street , c.zip , c.town, c.birthdate, c.phone, c.email, c.child_name,
|
SELECT c.id, c.first_name, c.last_name , c.street , c.zip , c.town, c.birthdate, c.phone, c.email, c.child_name,
|
||||||
c.child_street, c.subscription, c.bank_name, c.iban, c.bic, c.account_member_name, c.membership_status, c.salt, c.membership_start,
|
c.child_street, c.subscription, c.bank_name, c.iban, c.bic, c.account_member_name, c.membership_status, c.salt, c.membership_start,
|
||||||
cs.`status_text`, (SELECT ph.`payment_date` FROM `paying_history` ph WHERE ph.`clubmember_id` = c.`id` ORDER BY `payment_date` DESC LIMIT 1) as last_payment,
|
cs.`status_text`, (SELECT ph.`payment_date` FROM `paying_history` ph WHERE ph.`clubmember_id` = c.`id` ORDER BY `payment_date` DESC LIMIT 1) as last_payment,
|
||||||
cp.description
|
cp.description
|
||||||
@@ -557,7 +557,7 @@ queryend;
|
|||||||
$result = mysqli_query($this->dbConnection, $query);
|
$result = mysqli_query($this->dbConnection, $query);
|
||||||
$entries = [];
|
$entries = [];
|
||||||
while ($row = mysqli_fetch_assoc($result)) {
|
while ($row = mysqli_fetch_assoc($result)) {
|
||||||
$entries[] = [
|
$entry = [
|
||||||
'last_name' => $this->decode($row['last_name'], $row['salt']),
|
'last_name' => $this->decode($row['last_name'], $row['salt']),
|
||||||
'first_name' => $this->decode($row['first_name'], $row['salt']),
|
'first_name' => $this->decode($row['first_name'], $row['salt']),
|
||||||
'street' => $this->decode($row['street'], $row['salt']),
|
'street' => $this->decode($row['street'], $row['salt']),
|
||||||
@@ -578,6 +578,9 @@ queryend;
|
|||||||
'last_payment' => $row['last_payment'],
|
'last_payment' => $row['last_payment'],
|
||||||
'description' => $row['description'],
|
'description' => $row['description'],
|
||||||
];
|
];
|
||||||
|
if ($withId) [
|
||||||
|
$entry['id'] = $row['id'];
|
||||||
|
$entries[] = $entry;
|
||||||
}
|
}
|
||||||
return $this->sortUserList($entries);
|
return $this->sortUserList($entries);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user