This repository has been archived on 2026-06-03. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
sgd/ysqld/ysql07d/kap1/1_7_datensätze.php

19 lines
393 B
PHP

<?php
include("list.php");
try {
$pdo = new PDO ("mysql:dbhost=$dbhost;dbname=$dbname;charset=utf8", $dbuser, $dbpw);
} catch (PDOException $e) {
die($e->getMessage());
}
$sql = "SELECT * FROM teilnehmer ORDER BY name";
if ($stmt=$pdo->query($sql)) {
while ($zeile = $stmt->fetch(PDO::FETCH_NUM)) {
echo "<pre>", print_r($zeile) ,"</pre>";
}
}
?>