Browse Source

Merge branch 'DA-Startingcode' of JessyBruyneel/DA_SDB_JB_NorthWind into master

master
JessyBruyneel 4 years ago
parent
commit
6e5ebd2307
2 changed files with 21 additions and 0 deletions
  1. BIN
      Northwind_large.sqlite
  2. 21
    0
      index.php

BIN
Northwind_large.sqlite View File


+ 21
- 0
index.php View File

@@ -0,0 +1,21 @@
<html>
<body>
<?php
//('Northwind_large.sqlite');
$db = new PDO("sqlite:Northwind_large.sqlite");

$test = $db->prepare("SELECT * FROM Category");
$test->execute();
$row = $test->fetchall();
$db = null;

echo "<table border='1'><tr><td><b>ID</b></td><td><b>Name</b></td><td><b>Description</b></td></tr>";
for ($x=0; count($row) > $x; $x++) {
echo "<tr><td>" . $row[$x]['Id'] . "</td><td>" . $row[$x]['CategoryName'] . "</td><td>" . $row[$x]['Description'] . "</td></tr>";
}
echo "</table>"

//https://stackoverflow.com/questions/16728265/how-do-i-connect-to-an-sqlite-database-with-php
?>
</body>
</html>

Loading…
Cancel
Save