Submitted by Kiran on Sun, 02/15/2009 - 16:59
Communicate with SQLite Using PHP
SQLite being a serverless database system included in PHP 5.
Using SQLite you can access local files as if they were databases and have a full set of standard SQL functions. SQLite comes prebundled with PHP 5; however, it is not enabled by default.
Here we will discuss a PHP script that connects, inserts new data, retrieves data, and closes the connection to our example database.
First let's create SQLite tables using PHP
<?php
// Open the database:
if (!($db = sqlite_open('example.db'))) {
// Handle errors
die('SQL ERROR: Open failed: ' .
»
- Kiran's blog
- Add new comment
- Read more
- 768 reads













