Antworten: SQL-Ergebnis holen, nicht nur binden.
This commit is contained in:
parent
00ed4af18b
commit
fd248cc526
@ -8,7 +8,7 @@
|
|||||||
* of the
|
* of the
|
||||||
*
|
*
|
||||||
* Bundesanstalt Technisches Hilfswerk
|
* Bundesanstalt Technisches Hilfswerk
|
||||||
* Provinzialstraße 93
|
* Provinzialstra<EFBFBD>e 93
|
||||||
* D-53127 Bonn
|
* D-53127 Bonn
|
||||||
* Germany
|
* Germany
|
||||||
* E-Mail: redaktion@thw.de
|
* E-Mail: redaktion@thw.de
|
||||||
@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
||||||
Auflösungen zu allen Fragen
|
Aufl<EFBFBD>sungen zu allen Fragen
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -69,22 +69,26 @@ if (isset($_SESSION['zufallsfragen']) || isset($_SESSION['bogen'])) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($katalog > 0) {
|
if ($katalog > 0) {
|
||||||
|
$selectedNr = NULL;
|
||||||
|
$selectedDescription = NULL;
|
||||||
|
|
||||||
$stmt = $GLOBALS['db']->prepare('SELECT `Nr`,`Beschreibung` FROM `abschnitte` WHERE `Nr` = ? AND `Jahr` = ?');
|
$stmt = $GLOBALS['db']->prepare('SELECT `Nr`,`Beschreibung` FROM `abschnitte` WHERE `Nr` = ? AND `Jahr` = ?');
|
||||||
$stmt->bind_param('ii', $katalog, $_SESSION['jahr']);
|
$stmt->bind_param('ii', $katalog, $_SESSION['jahr']);
|
||||||
$stmt->execute();
|
$stmt->execute();
|
||||||
$stmt->bind_result($nr, $description);
|
$stmt->bind_result($selectedNr, $selectedDescription);
|
||||||
|
$stmt->fetch();
|
||||||
|
|
||||||
addBreadcrumb($_REQUEST['show'].'&katalog=' . $nr, $description);
|
addBreadcrumb($_REQUEST['show'].'&katalog=' . $selectedNr, $selectedDescription);
|
||||||
|
|
||||||
$tpl->addTemplates(Array(
|
$tpl->addTemplates(Array(
|
||||||
'content' => 'aufloesung-antworten'
|
'content' => 'aufloesung-antworten'
|
||||||
));
|
));
|
||||||
|
|
||||||
$tpl->addVars(Array(
|
$tpl->addVars(Array(
|
||||||
'abschnittNr' => $nr,
|
'abschnittNr' => $selectedNr,
|
||||||
'abschnittName' => htmlspecialchars($description)
|
'abschnittName' => htmlspecialchars($selectedDescription)
|
||||||
));
|
));
|
||||||
|
|
||||||
$stmt->close();
|
$stmt->close();
|
||||||
|
|
||||||
$stmt = $GLOBALS['db']->prepare('SELECT * FROM `fragen` WHERE `Abschnitt` = ? AND `Jahr` = ? ORDER BY Abschnitt,Nr ASC');
|
$stmt = $GLOBALS['db']->prepare('SELECT * FROM `fragen` WHERE `Abschnitt` = ? AND `Jahr` = ? ORDER BY Abschnitt,Nr ASC');
|
||||||
|
Loading…
Reference in New Issue
Block a user