SQLite Tutorial in PHP

SQLite is an SQL database manager used locally or on a website, and compatible in particularly with PHP.
Any software can use it to store data rather than in text files, and then make requests for accessing the data. In return, SQLite does not allow writing in the database to multiple concurrent users and therefore is not suitable for a big website.

SQL commands are the same as in MySQL, only PHP functions to send them are different.

SQLite can be used by HTML 5 in browsers to store content locally in a database and use it offline.

Summary

  1. Installing SQLite and creating a database.
    Installing SQLite. Verifying the installation by creating a base.
  2. Creating and using a SQLite table.
    Creating a table. Deleting a table. Adding a record. Reading a record.
  3. How to find and update a post.
    Filling a database. Dump of the whole base. Finding a record by ID. Searching a post. Updating a post.

Download

The complete source code of the scripts in a ZIP archive and the source code for the SQLite 3 version.

Resources