luasql icon indicating copy to clipboard operation
luasql copied to clipboard

SQL persistance

Open wcklr opened this issue 2 years ago • 1 comments

A short post from SQL persistance.lua

local sqlite3 = require("lsqlite3")

local db = sqlite3.open(app.dir() .. "/foo.db")

db:exec[[ CREATE TABLE test (id INTEGER PRIMARY KEY AUTOINCREMENT, content); ]]

print(db:errmsg())

db:exec[[ INSERT INTO test (content) VALUES ('corrupt#8513'); ]]

print(db:errmsg())

for row in db:nrows("SELECT * FROM test") do print(row.id, row.content) end

db:close()

a screenshot

Screenshot_20220720-224336-1.jpg

wcklr avatar Jul 21 '22 01:07 wcklr

Hi

I didn't understand what you mean with this issue. What is the problem?

tomasguisasola avatar Jul 27 '22 13:07 tomasguisasola