SQLite Edit for PHP
- On this page:
- Introduction
- Example
- Download
- Other pages:
- About
- API reference
- Search functionality
- Data editing functionality
- License
- FAQs
- Changelog
- GitHub repository
Introduction
SQLite Edit for PHP is a web-based admin tool for making interfaces to your SQLite database tables. It's not a full database admin tool however. You cannot use it to add, modify or delete tables, views etc. You wouldn't give such a tool to your users, allowing them to destroy your database! It's a tool that allows the addition, editing and deletion of data in existing tables. Adding, editing and deletion can all be enabled or disabled so you can turn them all off and just allow viewing the data if you wish.
It can be easily integrated into your pages - as you can see from the example below. It's just a single library file which makes it simple to setup and go.
What about the phpSQLiteAdmin application?
SQLite Edit for PHP cannot be used for database administration tasks. It has no facilities to add, edit or delete tables, indexes or views etc. Read more in the FAQs here.
Example
And here's the source-code that produces the editor above.
<?php
$editor = new SQLiteEdit([
'filename' => 'examples/sqliteedit.db',
'table' => 'accounts',
'sql_select' => "SELECT id,
username,
created,
forename,
surname
FROM accounts
WHERE {where}
{order}",
'sql_insert' => false,
'sql_delete' => false,
'paging_perpage' => 7,
'columns_names' => [
'id' => 'ID',
'username' => 'Username',
'created' => 'Created',
'forename' => 'Forename',
'surname' => 'Surname'
],
'style' => [
'div.editor table {line-height: 25px;}',
'div.editor table th {text-align: center;}',
'div.editor table tbody tr:hover {background-color: #eee;}',
'div.editor table {width: 100% !important;}'
],
'actions' => [
'<small><i>(add/edit/delete are disabled on this demo)</i></small>'
],
'search_callback' =>function ($obj, $columns, &$terms)
{
foreach ($terms as &$t) {
if ( in_array($t, ['january', 'february', 'march', 'april', 'may', 'june', 'july', 'august', 'september', 'october', 'november', 'december','jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', 'sep', 'oct', 'nov', 'dec'])) {
$t = date('-m-', strtotime($t));
}
}
}
]);
$editor->draw();
?>
Download
This is the latest zip file download that contains the PHP file (it's just a single file) and the example pages. Extract this zip file to a directory on to your (PHP enabled) web server and all of the examples should run without any further modification or configuration.
 
Last updated: 26th September 2026