fixed from error
This commit is contained in:
@@ -541,9 +541,9 @@ class Renderer {
|
||||
return $decoded;
|
||||
}
|
||||
|
||||
protected function getMemberList(): array {
|
||||
protected function getMemberList(bool $withId = false): array {
|
||||
$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,
|
||||
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
|
||||
@@ -557,7 +557,7 @@ queryend;
|
||||
$result = mysqli_query($this->dbConnection, $query);
|
||||
$entries = [];
|
||||
while ($row = mysqli_fetch_assoc($result)) {
|
||||
$entries[] = [
|
||||
$entry = [
|
||||
'last_name' => $this->decode($row['last_name'], $row['salt']),
|
||||
'first_name' => $this->decode($row['first_name'], $row['salt']),
|
||||
'street' => $this->decode($row['street'], $row['salt']),
|
||||
@@ -578,6 +578,9 @@ queryend;
|
||||
'last_payment' => $row['last_payment'],
|
||||
'description' => $row['description'],
|
||||
];
|
||||
if ($withId) [
|
||||
$entry['id'] = $row['id'];
|
||||
$entries[] = $entry;
|
||||
}
|
||||
return $this->sortUserList($entries);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user