Jump to content

SQLite


KariiiM

Recommended Posts

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

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
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

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...