FAQs for SQLite Edit for PHP
- Is this software free to use commercially?
- Does this software support any other type of database?
- Is it possible not to delete rows and, instead, mark them as deleted?
- Can I add one or more buttons to the right of each row?
- Why don't I see any error or confirmation messages from the editor?
- How can I quickly select multiple rows?
- Is this just another phpSQLiteadmin tool?
- How is this software related to RGraph?
Is this software free to use commercially?
Yes. SQLite Edit for PHP is released to the public domain - just like SQLite itself is so you can do with it as you wish. Include it in your application, provide it as part of a downloadable or just print the code out and cover your walls with it. Do with it as you wish.
Does this software support any other type of database?
No, but the SQLite-specific parts of the code are minimal, so converting it to or adding support for another type of database won't be difficult. Additionally, the database calls go through an abstraction layer (a set of functions that centralise the calls to the database). This will make changing to another type of database even easier.
Is it possible not to delete rows and, instead, mark them as deleted?
Yes, you can do that by changing the default queries. You would change the sql_delete query to update a "deleted" flag on the row instead of performing a delete query and also change the default sql_select option to one that excludes rows that have that deleted flag set (the default for that column should be null).
Can I add one or more buttons to the right of each row?
Yes, you can do this by selecting an empty column in your query and then using the columns_callbacks option to set the HTML for that column. The sql_select option query that selects data for the editor would look like this (the columns_escape option is also set here for this column so the HTML appears instead of the HTML markup itself):
'sql_select' => "SELECT id,
username,
created,
forename,
surname,
'' AS `actions`
FROM accounts",
'columns_escape' => ['actions' => false],
You could add a columns_names property like this so that the new column does not have a heading. You'd need to use CSS if your headings have a background color but you don't want one for this column.
'columns_names' => [
'id' => 'ID',
'username' => 'Username',
'created' => 'Created',
'forename' => 'Forename',
'surname' => 'Surname',
'actions' => ''
],
And then in the columns_callbacks option you would need to add the code that creates the button that's added to that empty column.
'columns_callbacks' => [
'actions' => function ($obj, $row_data, $name, $value)
{
return sprintf('<button type="button" onclick="event.preventDefault(); location.href = \'account.php?id=%d\'">View account</button>', $row_data['id']);
// This creates a dropdown list instead of a button. It
// might be more useful to you if you have a lot of actions.
// return sprintf('<select onchange="location.href = this.value"><option></option><option value="account.php?id=' . $row_data['id'] . '">View account</option></select>');
}
],
There's an example in the download archive called examples/accounts.php that demonstrates this technique. Note that if you add a <button> tag, you should give the tag a type attribute with a value of button as shown below. This prevents the delete form being submitted when the button is pressed. For example:
<button type="button" onclick="...">My submit button</button>
Why don't I see any error or confirmation messages from the editor?
The editor can be included in the page at any point, meaning that there's no guarantee that output (ie HTML) may have already started to be sent to the users browser at the point that the editor code runs.
In practice, this means that the editor cannot start a session with the PHP function session_start() because if any output has indeed already been sent then an error will be generated and will show up on the page.
What this means is that you need to start the session yourself using the session_start() function which will allow the editor to successfully show error messages to the user.
How can I quickly select multiple rows?
SQLite Edit for PHP supports block selection and deselection by using the SHIFT key:
- Select (or deselect) the starting row.
- Hold down SHIFT on the keyboard.
- Select (or deselect) the end row.
And all of the rows between the start and end rows (as well as the start and end rows) will be checked or unchecked, based on the current status (checked or not) of the starting row.
Is this just another phpSQLiteAdmin tool?
SQLite Edit for PHP is not a phpSQLiteAdmin type application. It's certainly not intended to allow users to make changes to your database structure - hence you can't add, edit or delete tables, indexes, or views.
The purpose of SQLite Edit for PHP is to allow you to easily and quickly create interfaces that you can use to safely add, edit and delete data that's contained in your tables. It's something that you can use to create interfaces in your administration pages. This is something that (virtually) everyone needs to do and by using this tool it can be done very easily and very quickly.
Can you use it for frontend user pages though? Yes, you can if you're happy with how it looks (though you can customise the appearance using CSS (the style option). You can use it to allow full CRUD operations or you can disable the add, update and delete functions and just use it to quickly provide a view of your data with paging and a search function.
It's very customisable so if it doesn't do exactly what you want it to out-of-the-box then it might be able to do it with a little customisation.
How is this software related to RGraph?
For a long time the RGraph website has been run using another RDBMS. This RDBMS has its advantages and some very useful features - however for some things it's just overkill and somewhat unnecessary.
Enter SQLite!
SQLite is small, fast, easy-to-use and more than accommodates (most of) the requirements of the RGraph website. Not everything will be suited to a change to SQLite though. For example the forum uses some specialised search features that SQLite doesn't support, so for that the former RDBMS will remain in place.
But for other purposes SQLite is more than enough and still very fast.
Last updated: 26th September 2026