KariiiM Posted September 26, 2015 Share Posted September 26, 2015 Hey guys, As all know to create a sqlite you need a SQL file to store the data in so the sqlite create file automaticly by your order something like that, already i had some skills for SQL Language i study it in school, but i have no idea about this way it's a MTA function, dbConnect ("sqlite","database.sql" ) --it's the default and the normal way to create sql file My question is, is there's any way to connect the sqlite to my own file created in a folder without using the default way and with old data? i think it's possible that's why i'm asking. -Thanks in advance. ~Regards, KariM. Link to comment
Moderators Citizen Posted September 26, 2015 Moderators Share Posted September 26, 2015 dbConnect is creating the .sql file only if it doesn't exists already. So if you have a .sql database, just give the correct path to it and it will connect to it just fine. So if you put mydb.sql into the "databases" folder just connect to it like this: dbConnect ("sqlite","databases/mydb.sql" ) Link to comment
KariiiM Posted September 26, 2015 Author Share Posted September 26, 2015 dbConnect is creating the .sql file only if it doesn't exists already. So if you have a .sql database, just give the correct path to it and it will connect to it just fine.So if you put mydb.sql into the "databases" folder just connect to it like this: dbConnect ("sqlite","databases/mydb.sql" ) Yes that's what i want to hear , thanks for the reply 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