Edikosh998 Posted February 15, 2012 Posted February 15, 2012 Hi everyone, I've got a problem with SQL syntax : function SQLTableStart() executeSQLCreateTable("jugadores", "Name TEXT,columnAccount TEXT") executeSQLCreateTable("cordes","ID STRING,columnX FLOAT,columnY FLOAT,columnZ FLOAT") end addEventHandler("onResourceStart",resourceRoot,SQLTableStart) function creacio(_,account) local dataDos = getAccountData(account,"edad") local username = getAccountName(account) local name = getPlayerName(source) if account then local data = getAccountData(account,"LARP.player") local dataDos = getAccountData(account,"LARP.Actual") local dataTres = getAccountData(account,"LARP.edad") if not data then showCursor(source,true) triggerClientEvent("onCreation",source,source) sql.Query("INSERT INTO jugadores (Name, columnAccount) VALUES ('d','"..username.."')") -- Here is the problem sql.Query("INSERT INTO cordes (ID, columnX, columnY, columnZ) VALUES ('"..username.."','','','')") end end end Problem : --No column named Name WRS( World Racing Server) [server] = 8%
Castillo Posted February 15, 2012 Posted February 15, 2012 Are you sure it exists? have you checked the table manually? San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Kenix Posted February 15, 2012 Posted February 15, 2012 addEventHandler( "onResourceStart",resourceRoot, function( ) executeSQLQuery( "CREATE TABLE IF NOT EXISTS jugadores ( Name TEXT,columnAccount TEXT )" ) executeSQLQuery( "CREATE TABLE IF NOT EXISTS cordes ( ID STRING,columnX FLOAT,columnY FLOAT,columnZ FLOAT )" ) end ) function creacio( _,account ) local username = getAccountName( account ) if account then local data = getAccountData( account,"LARP.player" ) if not data then showCursor( source,true ) triggerClientEvent( "onCreation",source,source ) executeSQLQuery( "INSERT INTO jugadores VALUES ('','"..username.."')" executeSQLQuery( "INSERT INTO cordes VALUES ('"..username.."','','','')" ) end end end addEventHandler( 'onPlayerLogin',root,creacio ) http://vk.com/the_kenix Вопросы задавайте на форуме, не пишите мне в личку. Please don't pm me.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now