Problem with SQL

There is a problem in the gmod wiki - I fixed this once. Now I formatted pc, got old source but cant remember what the issue was.



function setuptable()
	if sql.TableExists("lat_players") then
		PMsg("LAT server has initialized successfully. 
")
		PMsg("SQL Tables set up successfully. 
")
	else
		query = "CREATE TABLE lat_players ( unique_id string, ip string, steamid string, rank string, immunity int, ban int, banreason string )"
		result = sql.Query(query)
		if (sql.TableExists("lat_players")) then
			PMsg("Tabes created and set up successfully. 
")
		else
			PMsg("Something went wrong with creating the tables! 
")
			PMsg( sql.LastError( result ) .. "
" )
		end	
	end
end

function setupdatatables( ply )
	setupnewp(ply)
	PMsg(ply:Nick() .. " joined for the first time. 
")
end

function setupnewp( ply )
     query1 = "INSERT INTO lat_players ( unique_id, ip, steamid, rank, immunity, ban, banreason ) VALUES ( unique_id = '" .. ply:UniqueID() .. "', ip = '" .. ply:IPAddress() .. "', steamid = '" .. ply:SteamID() .. "', rank = 'guest', immunity = 0, ban = 0, banreason = 'You were permanently banned.' )" 
     result1 = sql.Query(query1)
	 PMsg( sql.LastError( result1 ) .. "
" )
	 PMsg( sql.LastError( result ) .. "
" )
	 PMsg("New player set up. 
")
end


no such table unique_id



query1 = "INSERT INTO lat_players ( unique_id, ip, steamid, rank, immunity, ban, banreason ) VALUES ('" .. ply:UniqueID() .. "','" .. ply:IPAddress() .. "','" .. ply:SteamID() .. "', 'guest', 0, 0, 'You were permanently banned.' )" 


this should fix it

I love you