Ryancit2 Posted March 4, 2014 Posted March 4, 2014 Well..I mean i dont know how people make .db file inside their scripts..I wanna know how to? Is that automatic? If so, how?
Karuzo Posted March 4, 2014 Posted March 4, 2014 local connect addEventHandler("onResourceStart", resourceRoot,function() connect = dbConnect( "sqlite", "file.db", "", "", "share=0" ) if connect then outputDebugString("Connected to the Database!") local tablec = dbQuery ( connect , "CREATE TABLE IF NOT EXISTS tablename (columna,columnb,columnc)" ) if tablec then outputChatBox("Table Created") else outputChatBox("Table couldn't be created!") end else outputDebugString("Couldn't connect to the databse!", 1) end end) This will create a .db file called file.db . And will create a Table if no table exists.
Ryancit2 Posted March 4, 2014 Posted March 4, 2014 Okay thanks alot Oh and do i still gotta install those two modules to run DB files?
ArromG Posted March 22, 2014 Posted March 22, 2014 Hi For connection MySQL with server , think i need 2 files File is 1.Folder Name << Mysql >> and files << connection.lua , meta.xml , s_mysql.lua >> 2.Folder Name << SQL >> and files << layout.lua , meta.xml mysql.lua >> in this is really for need 2 files to connection????
Noki Posted April 14, 2014 Posted April 14, 2014 HiFor connection MySQL with server , think i need 2 files File is 1.Folder Name << Mysql >> and files << connection.lua , meta.xml , s_mysql.lua >> 2.Folder Name << SQL >> and files << layout.lua , meta.xml mysql.lua >> in this is really for need 2 files to connection???? That's what you need for a custom system that relies on exports.
Twisted Posted April 25, 2014 Posted April 25, 2014 Please update Server.zip link This has been outdated for a long time now. I suggest using MTA's built in db functions now.
Sergioks Posted May 11, 2014 Posted May 11, 2014 server.zip not found or never existed. Please update the link ( Sorry for bad english )
Twisted Posted May 12, 2014 Posted May 12, 2014 server.zip not found or never existed. Please update the link ( Sorry for bad english ) You may wanna read all the comments. This is outdated, has been since like day 1. Use MTA's db functions instead.
Recommended Posts