Dzemous Posted July 14, 2017 Share Posted July 14, 2017 Why this connect doesn't work? local connect = dbConnect("sqlite",":resources/Mlife.db") Script is in: Resources/ZP (ZP this folder with script) Data Base File is in main folder with scripts. Script can't find data base file about name Mlife.db, but this data base file there is Link to comment
Simple0x47 Posted July 14, 2017 Share Posted July 14, 2017 Move the database file to the ZP folder and change this to. local connect = dbConnect("sqlite",":ZP/Mlife.db") Link to comment
Dzemous Posted July 14, 2017 Author Share Posted July 14, 2017 I don't will create multi data base. I want to have one for everything Link to comment
Simple0x47 Posted July 14, 2017 Share Posted July 14, 2017 Then do it like this, put the database into the sql folder and for accessing the database use the exported function like this way. exports.sql:query( theDatabaseID, theQueryString ) -- theDatabaseID is the key that holds the database value in main.lua, yours is 1, and the querystring is a query for example "INSERT INTO ..." http://www75.zippyshare.com/v/Ko6JMf2O/file.html Link to comment
Dzemous Posted July 14, 2017 Author Share Posted July 14, 2017 Ok, thanks Can close this topic. Link to comment
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