I was looking at the TLO for SQLite, and thinking about trying to use it in Lua.
testrows is getting the value of 0, yet when I do this query in game and run /echo ${sqlite.rows[testquery]} I get 3.
What am I missing? Or is the sqlite TLO not as workable in Lua and I need to go through other methods of accessing the database?
Code:
local path = ("%s/testdb/MQ2LinkDB.db"):format(mq.luaDir)
mq.cmdf('/sqlite query "%s" testquery SELECT * FROM raw_item_data_315 where name = "Cloth Cap";', path)
testrows = mq.TLO.sqlite.rows(testquery)()
testrows is getting the value of 0, yet when I do this query in game and run /echo ${sqlite.rows[testquery]} I get 3.
What am I missing? Or is the sqlite TLO not as workable in Lua and I need to go through other methods of accessing the database?

