MSQL Request Syntax Error

Hello !

I try to insert in my DB a new player but i can’t find the syntax error here :

--res is a local variable where are stored all value
MySQL.Async.execute(
                "INSERT INTO users (identifier,license,pos,cash,bank,permisson_level,group) VALUES (@identifier,@license,@pos,@cash,@bank,@permisson_level,@group)",
                {
                    ["@identifier"] = res.identifier,
                    ["@license"] = res.license,
                    ["@pos"] = res.pos,
                    ["@cash"] = res.cash,
                    ["@bank"] = res.bank,
                    ["@permisson_level"] = res.permisson_level,
                    ["@group"] = res.group
                })

My DB look like this :

check that there are no → ",/ … ← letters in one of the res… values

the res.pos is an json.encode of this

function GetPlayerPos(src)
    local p = GetPlayerPed(src)
    local pos = {
        coord = GetEntityCoords(p),
        heading = GetEntityHeading(p)
    }
    return pos
end

and it look like this have some / in string

res.pos is like this

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.