SQLite Edit for PHP

SQLite Edit for PHP is a web-based admin tool for managing your SQLite databases that you can use to give your users the ability to view, edit and update the data without the danger of them destroying the database.

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

⮾ ⚲
  help
Displaying 22 - 27 of 27 results
◀  1  2  3  4  ▶
ID
Username
Created
Forename
Surname
41101
quentink
2002-06-13
Quentin
Kerry
41102
loosel
2004-08-09
Lily
Loose
41103
campbellj
2007-01-26
John
campbell
41104
larrym
2001-01-09
Larry
Loose
41105
jasminej
2009-09-09
Jasmine
Jo
41134
jasons
2016-06-09
Jason
Statham
 (add/edit/delete are disabled on this demo)

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.

Download SQLite Edit for PHP

 

Last updated: 26th September 2026