Well anyways, I FINALLY found the solution after scouring the internet, ther just doesn’t seem to be too many advance SQLite lua resources/tutorials/examples.
Solution 1 (no BLOBS used):
[lua]db:exec[[CREATE TABLE league (schedule TEXT, day INTEGER);]]
local sched = json.encode(sg:generateSchedule());
local stmt= db:prepare[[INSERT INTO league (schedule, day) VALUES( ?, ?)]];
stmt:bind_values( sched, 1)
stmt:step();[/lua]
Solution 2 (WITH BLOBS):
[lua]
db:exec[[CREATE TABLE league (schedule TEXT, day INTEGER);]]
local sched = json.encode(sg:generateSchedule());
local stmt= db:prepare[[INSERT INTO league (schedule, day) VALUES( ?, ?)]];
stmt:bind_values( nil, 1)
stmt:bind_blob(1, sched)
stmt:step();
[/lua]
Strange thing is, both of these solutions actually store a blob in the database:
http://imgur.com/QXRAARX
So I guess the only question left is when should I even use a BLOB field when I can just use a TEXT field instead?