Browse Source

Merge branch 'Emiel' of Emiel_DK/Database into master

master
Emiel_DK 4 years ago
parent
commit
7e54b51f6a
1 changed files with 32 additions and 3 deletions
  1. 32
    3
      index.php

+ 32
- 3
index.php View File

@@ -1,6 +1,35 @@
<html>
<head>
</head>
<body>

<?php
$dataBase = new SQLite3("Northwind_large.sqlite");

$result = $dataBase->query('SELECT * FROM Category');
var_dump($result->fetchArray());
?>

$numColumns = $result->numColumns();
?>

<table>
<tr>

<?php
for($y =0; $y < $numColumns; ++$y)
{
echo "<th>" . $result->ColumnName($y) . "</th>";
}
?>

</tr>
<?php
while($row = $result->fetchArray()){
echo "<tr>";
for($i = 0; $i < sizeof($row); $i++)
{
echo "<td>" . $row[$i] . "</td>";
}
echo "</tr>";
}
?>
</body>
</html>

Loading…
Cancel
Save