Tutorial by Examples

<?php //Create a new SQLite3 object from a database file on the server. $database = new SQLite3('mysqlitedb.db'); //Query the database with SQL $results = $database->query('SELECT bar FROM foo'); //Iterate through all of the results, var_dumping them onto the page while ($row = $resu...
In addition to using LIMIT SQL statements you can also use the SQLite3 function querySingle to retrieve a single row, or the first column. <?php $database = new SQLite3('mysqlitedb.db'); //Without the optional second parameter set to true, this query would return just //the first column of ...
This is a complete example of all the commonly used SQLite related APIs. The aim is to get you up and running really fast. You can also get a runnable PHP file of of this tutorial. Creating/opening a database Let's create a new database first. Create it only if the file doesn't exist and open it f...

Page 1 of 1