The SQLite Editor for PHP administration tool
- On this page:
- Introduction
- Example
- Download
- Other pages:
- API reference
- Search functionality
- License
- FAQs
- Changelog
Introduction
The SQLite Editor for PHP is an administration tool for making interfaces to your SQLite database tables. It's not a full database administration 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.
Example
And here's the source-code that produces the editor above.
<?php
$editor = new SQLiteEditor([
'filename' => 'examples/sqliteeditor.db',
'table' => 'accounts',
'sql_select' => "SELECT id,
username,
created,
forename,
surname
FROM accounts
WHERE {where}
{order}",
'sql_add' => false,
'sql_delete' => false,
'paging_perpage' => 10,
'columns_names' => [
'id' => 'ID',
'username' => 'Username',
'created' => 'Created',
'forename' => 'Forename',
'surname' => 'Surname'
],
'styles' => [
'div.editor table {line-height: 25px;}',
'div.editor table th {text-align: center;}',
'div.editor table tbody tr:hover {background-color: #eee;}'
],
'actions' => [
'<small><i>(add/edit/delete are disabled on this demo)</i></small>'
]
]);
$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.