You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.php 776B

123456789101112131415161718192021
  1. <html>
  2. <body>
  3. <?php
  4. //('Northwind_large.sqlite');
  5. $db = new PDO("sqlite:Northwind_large.sqlite");
  6. $test = $db->prepare("SELECT * FROM Category");
  7. $test->execute();
  8. $row = $test->fetchall();
  9. $db = null;
  10. echo "<table border='1'><tr><td><b>ID</b></td><td><b>Name</b></td><td><b>Description</b></td></tr>";
  11. for ($x=0; count($row) > $x; $x++) {
  12. echo "<tr><td>" . $row[$x]['Id'] . "</td><td>" . $row[$x]['CategoryName'] . "</td><td>" . $row[$x]['Description'] . "</td></tr>";
  13. }
  14. echo "</table>"
  15. //https://stackoverflow.com/questions/16728265/how-do-i-connect-to-an-sqlite-database-with-php
  16. ?>
  17. </body>
  18. </html>