look at the last post.. You need to include your database object in that function.
local name = tmysql.escape(BATABASE_OBJECT, player:Name());
local steamID = tmysql.escape(BATABASE_OBJECT, player:SteamID());
local uniqueID = tmysql.escape(BATABASE_OBJECT, player:UniqueID());
Since you didn't post your whole code, I can't tell you what that is.. you'll need to figure it out on your own..
and FYI, this is lua.. not SQL.