- prepare("SELECT name FROM boards");
- $statement->execute();
+ $statement = $pdo->prepare("SELECT name FROM boards");
+ $statement->execute();
- echo "
"
- foreach($statement->fetchAll() as $ROW) {
- echo "
- - $ROW[name]
";
- }
- echo "
"
- }
- catch(PDOException $Exception) {
- $error_message = "Error: SQL error.\n" . $statement->queryString . "\n" . $statement->errorInfo()[2];
- }
+ echo "
"
+ foreach($statement->fetchAll() as $ROW) {
+ echo "
+ - $ROW[name]
";
+ }
+ echo "
"
+ }
+ catch(PDOException $Exception) {
+ $error_message = "Error: SQL error.\n" . $statement->queryString . "\n" . $statement->errorInfo()[2];
+ }
- $pdo = null;
- ?>
-