• Returns Nil
    2 replies, posted
[lua] query = "INSERT INTO `tb_users` ( `UserName`, `STEAMID`, `groupID` ) VALUES ( '" .. mysql.escape( TS.SQL, args[1] ) .. "', '" .. mysql.escape( TS.SQL, ply:SteamID() ) .. "', '1' )"; mysql.query( TS.SQL, query ); query = "SELECT `uID` FROM `tb_users` WHERE `STEAMID` = '" .. mysql.escape( TS.SQL, ply:SteamID() ) .. "'"; tab = mysql.query( TS.SQL, query ); ply:SetField( "uid", tab[1][1] ); [/lua] UID returns as a NIL field. Why?
Is uID supposed to be your PRIMARY KEY? Is it set to auto_increment?
1.Yes 2. The table is, Do I need to set it in the code anywhere?. =p
Sorry, you need to Log In to post a reply to this thread.