SQLite PHP

PHP provides two SQLite extensions by default since version 5.0. The latest SQLite extension is known as sqlite3 extension that is included in PHP 5.3+.

The sqlite3 extension provides an interface for accessing SQLite 3. The sqlite3 includes class interfaces to the SQL commands. In addition, it allows you to create SQL functions and aggregate using PHP.

PHP introduced the PDO interfaces since version 5.1. The  PDO is the latest PHP solution that provides a unified database access interface. Note that PDO is just an abstract layer that allows you to use a common library to access any databases. In the context of SQLite, it needs sqlite3 extension to access SQLite database.

The PDO_SQLITE extension provides the PDO driver for the SQLite 3 library. It supports standard PDO interfaces, and also custom methods for creating SQL functions and aggregates using PHP.

In this section, we will walk you through the steps of using PDO to access SQLite databases.

SQLite PHP