Jump to content

SQLite LAST_INSERT_ROWID() problem


Recommended Posts

Also, you can't use dbExec to get the ID. You'll have to use dbQuery + dbPoll as follows:

local result = dbPoll(dbQuery(db, "SELECT LAST_INSERT_ROWID() AS `ID`"), -1) 
outputChatBox(result.ID) 

("FROM joinHistory" isn't necessary according to the SQLite documentation btw)

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...