I have never touched SQLite before and therefore I am trying to create a table with SteamID and Name in. I am then trying to update the Name field in the Players1 table where the SteamID is. I am then trying to see if it has updated correctly.
The problem is, it doesn't update it. It brings the error
I get to the last function:
[code]
Table exists, updating
Failed: no such column: SteamID
[/code]
But I'm making the SteamID column..?
[lua]
if( !sql.TableExists( "Players1" ) ) then
sql.Query( "CREATE TABLE Players1 ( SteamID text, Name text )" )
print( "No, making table" )
if( !sql.TableExists( "Players1" ) ) then
print( "Still No")
return
end
end
print( "Table exists, updating" )
sql.Query( "UPDATE `Players1` SET Name = '" .. args[2] .. "' WHERE SteamID = '" .. ply:SteamID() .. "'" )
local profiledata = sql.Query( "SELECT * FROM `Players1` WHERE SteamID = '" .. ply:SteamID() .. "'" )
if( profiledata ) then
print( "Worked" )
else
print( "Failed:", sql.LastError( profiledata ) )
end
[/lua]
Theres probbably a error creating the table, that query dosent look right...
Nevermind, fixed.
Sorry, you need to Log In to post a reply to this thread.