Trouble inserting data into an sqlite3 database
#3
Woops, totally forgot.! I just forgot when I read the Lua Sqlite documentation. For example here, they don't show it's needed. I should just stop using phpMyAdmin for everything and write more queries myself Wink

Now I changed it around a bit:
stmt = db:prepare("CREATE TABLE IF NOT EXISTS test (id INTEGER PRIMARY KEY, name STRING, address STRING)")

According to the sqlite tool it seems to work... I get the following dump:
Code:
PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE test (id INTEGER PRIMARY KEY, name STRING, address STRING);
COMMIT;

I'm still having trouble actually inserting something with prepared statements though.
Reply
Thanks given by:


Messages In This Thread
RE: Trouble inserting data into an sqlite3 database - by PureTryOut - 11-20-2015, 06:19 AM



Users browsing this thread: 2 Guest(s)