query('SELECT * FROM mytable'); while ($row = $results->fetch_assoc()) { echo $row['name'] . ' ' . $row['age'] . '
'; } ?>
query("CREATE TABLE mytable (id INTEGER PRIMARY KEY, name TEXT, age INTEGER)"); $conn->query("INSERT INTO mytable (name, age) VALUES ('John', 30)"); $conn->query("INSERT INTO mytable (name, age) VALUES ('Jane', 25)"); $results = $conn->query('SELECT * FROM mytable'); while ($row = $results->fetch_assoc()) { echo $row['name'] . ' ' . $row['age'] . 'In this example, we have used the SQLite class from the System\Database package to establish a connection to a SQLite database. We have then created a table and inserted some data. Finally, we have fetched the data and printed it.
'; } ?>