|
|
@@ -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> |