· 9 years ago · Jan 10, 2017, 08:54 AM
1function SQL_InitializeServerTables()
2 local DB = GAMEMODE.MainDatabase
3 if (!DB) then Error("Your database is fucked! :C") return end
4
5 --Accounts
6 local s = {
7 "PlayerID BIGINT NOT NULL PRIMARY KEY",
8 "Money BIGINT UNSIGNED",
9 }
10
11 s = "CREATE TABLE IF NOT EXISTS Accounts("..table.concat(s,",")..");"
12
13 local a = mysql:Query(s,DB)
14
15 function a.onCompleted(s,Results)
16 print("Success")
17 end
18
19end