Getting Started

SQLite comes bundled with PHP 5, so all you have to do to install the database is run the db_install_script.php file.

However, if you do things this way you'll have to write code just to view your data or to examine the structure of your database. You might want to download the command-line version of SQLite instead. PHP 5, depending upon the subversion number, comes with SQLite versions 2.8.11 through 2.8.17. To find out which version is running on your system, display the results of the PHP function phpinfo in your browser and search for SQLite. For convenience, you might want to install the binary of sqlite in the same directory as your database.

Creating a database is as simple as typing the name of the SQLite executable ...

Get Object-Oriented PHP now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.