CREATE TABLE IF NOT EXISTS items (id INTEGER PRIMARY KEY, item TEXT); INSERT INTO items (item) SELECT :Item WHERE $edit IS NULL AND :Item IS NOT NULL; UPDATE items SET item = :Item WHERE id = $edit AND :Item IS NOT NULL; DELETE FROM items WHERE id = $delete; SELECT 'button' AS component; SELECT '?' AS link, 'New' AS title; SELECT 'form' AS component; SELECT (SELECT item FROM items WHERE id = $edit) AS value, 'Item' AS name; SELECT 'table' AS component, '' AS markdown, 'X' AS markdown, TRUE AS sort; SELECT item AS Item, id AS ID, '[edit](?edit='||id||')' AS '', '[x](?delete='||id||')' AS X FROM items;