master
Jakob 2020-03-04 10:35:49 +01:00
parent 1c677ae3c3
commit ba03547647
1 changed files with 2 additions and 1 deletions

View File

@ -24,7 +24,8 @@ $navbar="boards";
if (!$error) { if (!$error) {
$statement = $pdo->prepare("SELECT * FROM boards WHERE id=$_GET['id']"); $statement = $pdo->prepare("SELECT * FROM boards WHERE id=$_GET['id']");
$statement->execute(); $statement->execute();
echo $statement->fetchAll()[0]['name']"; $result = $statement->fetchAll();
echo $result[0]['name']
} }
if (!$result) { if (!$result) {
$error_message = "Error: SQL error.\n" . $statement->queryString . "\n" . $statement->errorInfo()[2]; $error_message = "Error: SQL error.\n" . $statement->queryString . "\n" . $statement->errorInfo()[2];