pa3ck Posted August 22, 2014 Posted August 22, 2014 Hey. I used to use MySQL instead of SQLite but I gotta use SQLite this time. I'd like to know how to get the last auto_increment value? I know I can count up the data and get the value but I'm sure there's an easier way. In MySQL it's: local query = dbQuery ( connection, "SHOW TABLE STATUS LIKE 'theTable'" )
Addlibs Posted August 22, 2014 Posted August 22, 2014 You could select all rows, check the values of the last one and add 1. This should work - not fully tested under all circumstances but it does the job.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now