forked from root/threadr.lostcave.ddnss.de
removed dead code
parent
d70cf6e3db
commit
06d085859e
|
@ -1,21 +1,11 @@
|
||||||
<?php
|
<?php
|
||||||
$pdo = new PDO('mysql:host=localhost;dbname=web', 'webstuff', 'Schei// auf Pa$$w0rter!');
|
$pdo = new PDO('mysql:host=localhost;dbname=web', 'webstuff', 'Schei// auf Pa$$w0rter!');
|
||||||
$error = false;
|
|
||||||
$error_message = "";
|
|
||||||
if (!$error) {
|
|
||||||
$statement = $pdo->prepare("SELECT * FROM posts WHERE board_id=:bid ORDER BY post_time asc");
|
$statement = $pdo->prepare("SELECT * FROM posts WHERE board_id=:bid ORDER BY post_time asc");
|
||||||
$statement->execute(array("bid"=>$id));
|
$statement->execute(array("bid"=>$id));
|
||||||
foreach($statement->fetchAll() as $ROW) {
|
foreach($statement->fetchAll() as $ROW) {
|
||||||
$error = false;
|
|
||||||
$error_message = "";
|
|
||||||
if (!$error) {
|
|
||||||
$statement = $pdo->prepare("SELECT * FROM users WHERE id=:uid");
|
$statement = $pdo->prepare("SELECT * FROM users WHERE id=:uid");
|
||||||
$statement->execute(array("uid"=>$ROW[user_id]));
|
$statement->execute(array("uid"=>$ROW[user_id]));
|
||||||
$post_user = $statement->fetch();
|
$post_user = $statement->fetch();
|
||||||
}
|
|
||||||
if (!$result) {
|
|
||||||
$error_message = "Error: SQL error.\n" . $statement->queryString . "\n" . $statement->errorInfo()[2];
|
|
||||||
}
|
|
||||||
echo "<section>";
|
echo "<section>";
|
||||||
echo "<h1>$ROW[title]</h1>";
|
echo "<h1>$ROW[title]</h1>";
|
||||||
echo "<article>";
|
echo "<article>";
|
||||||
|
@ -30,9 +20,5 @@ if (!$error) {
|
||||||
echo "</article>";
|
echo "</article>";
|
||||||
echo "</section>";
|
echo "</section>";
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if (!$result) {
|
|
||||||
$error_message = "Error: SQL error.\n" . $statement->queryString . "\n" . $statement->errorInfo()[2];
|
|
||||||
}
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue