I found this:
http://stackoverflow.com/questions/1601151/how-do-i-check-in-sqlite-whether-a-table-exists
However I simply don't know what to do with it. :P If I DatabaseExec() that and assign the result to a variable, it returns 0 (which means OK?).
I know that the file is empty (there are no tables in it) because it was created through DatabaseOpen() and nothing else was done, however how is that DatabaseExec() telling me anything?
What I want to do is to code all the database manipulation in very safe ways in order to prevent errors. I want my script to check to see if a table exists and, if it doesn't, create it etc before any attempt to retrieve, insert or modify data.
As a side question, can somebody point me to the best/most up to date "tutorial" on MUSHclient Lua SQLite?
http://stackoverflow.com/questions/1601151/how-do-i-check-in-sqlite-whether-a-table-exists
However I simply don't know what to do with it. :P If I DatabaseExec() that and assign the result to a variable, it returns 0 (which means OK?).
I know that the file is empty (there are no tables in it) because it was created through DatabaseOpen() and nothing else was done, however how is that DatabaseExec() telling me anything?
What I want to do is to code all the database manipulation in very safe ways in order to prevent errors. I want my script to check to see if a table exists and, if it doesn't, create it etc before any attempt to retrieve, insert or modify data.
As a side question, can somebody point me to the best/most up to date "tutorial" on MUSHclient Lua SQLite?