|
|
@@ -3,23 +3,28 @@ |
|
|
|
</head> |
|
|
|
<body> |
|
|
|
|
|
|
|
|
|
|
|
<?php |
|
|
|
$dataBase = new SQLite3("Northwind_large.sqlite"); |
|
|
|
$result = $dataBase->query('SELECT * FROM Category'); |
|
|
|
var_dump($result); |
|
|
|
|
|
|
|
$numColumns = $result->numColumns(); |
|
|
|
?> |
|
|
|
|
|
|
|
<table> |
|
|
|
<tr> |
|
|
|
<th> Id </th> |
|
|
|
<th> Category </th> |
|
|
|
<th> Description </th> |
|
|
|
|
|
|
|
<?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 < 3; $i++) |
|
|
|
for($i = 0; $i < sizeof($row); $i++) |
|
|
|
{ |
|
|
|
echo "<td>" . $row[$i] . "</td>"; |
|
|
|
} |