First Draft

First Draft of the Example Files
This commit is contained in:
RobinNixon
2020-12-10 13:21:38 +00:00
parent 77a7b57c4f
commit 0335342e00
1127 changed files with 46959 additions and 56 deletions
+27
View File
@@ -0,0 +1,27 @@
<?php
require_once 'login.php';
try
{
$pdo = new PDO($attr, $user, $pass, $opts);
}
catch (\PDOException $e)
{
throw new \PDOException($e->getMessage(), (int)$e->getCode());
}
$query = "DESCRIBE cats";
$result = $pdo->query($query);
echo "<table><tr><th>Column</th><th>Type</th><th>Null</th><th>Key</th></tr>";
while ($row = $result->fetch(PDO::FETCH_NUM))
{
echo "<tr>";
for ($k = 0 ; $k < 4 ; ++$k)
echo "<td>" . htmlspecialchars($row[$k]) . "</td>";
echo "</tr>";
}
echo "</table>";
?>