Jump to content

My SQL Error


Recommended Posts

Hi i got an error from the script and says 'unexpected symbol near ';'

Code:

mysqlconnect = {user=; connect=; password=; database=;} 
  
dbConnectTable = { 
    connect = false, 
    user = "user", 
    password = "", 
    ip = "thehost", 
    table = "table", 
} 
  

whats wrong??

Edited by Guest
Link to comment

I got a new error..... And say's attempt to index global 'infoDatabase' (a nil value) lua:15:

function onResourceInfoStart() 
    dbConnectTable.connect = dbConnect("mysql","dbname="..dbConnectTable.table..";host="..dbConnectTable.ip, dbConnectTable.user, dbConnectTable.password) 
    if dbConnectTable.connect then 
        checkMySQLTable(dbConnectTable.connect,infoDatabase.tableName,infoDatabase.tableStructure) 
        commandSystemMySQLInit() 
        likeSystemDatabaseInit() 
    end 
end 

Link to comment

its by a separated resource and this is the table...

local infoDatabase = { 
    tableName = "TC_Map_info", 
    tableStructure = { 
        {"mapName","TEXT DEFAULT '' NOT NULL"}, 
        {"author","TEXT DEFAULT '' NOT NULL"}, 
        {"created","TEXT DEFAULT '' NOT NULL"}, 
        {"lastTimePlayed","INT(6) DEFAULT 0 NOT NULL"}, 
        {"playedCount","INT(6) DEFAULT 0 NOT NULL"}, 
        {"toptimes","INT(6) DEFAULT 0 NOT NULL"}, 
        {"hunters","INT(6) DEFAULT 0 NOT NULL"}, 
        {"kills","INT(6) DEFAULT 0 NOT NULL"}, 
        {"assists","INT(6) DEFAULT 0 NOT NULL"}, 
    } 
} 

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