Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require("mysqloo")
- local host = "localhost"
- local port = 3306
- local name = "rp"
- local user = "root"
- local pass = ""
- function mysql_createmysqltables( database )
- /*
- local query1 = database:query("CREATE TABLE IF NOT EXISTS RP_CHARACTER ( id int(6) NOT NULL AUTO_INCREMENT, steamid text, name text, class text, age int(2), model text, faction int(1), inventory text, playergroup text, money int(9), x int(6), y int(6), z int(6), PRIMARY KEY (id)) ;")
- query1:start()
- local query2 = database:query("CREATE TABLE IF NOT EXISTS RP_CONFIG ( id int(6) NOT NULL AUTO_INCREMENT, conkey text, val text, PRIMARY KEY (id)) ;")
- query2:start()
- local query3 = database:query("CREATE TABLE IF NOT EXISTS RP_GROUPS ( id int(6) NOT NULL AUTO_INCREMENT, name text, owner text, admins text, upgrades text, bank text, PRIMARY KEY (id)) ;")
- query3:start()
- */
- end
- function mysql_connect()
- databaseObject = mysqloo.connect(host, user, pass, name, port)
- databaseObject.onConnected = mysql_createmysqltables
- databaseObject:connect()
- end
- mysql_connect()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement