Jump to content

[HELP] MYSQL - execute


Recommended Posts

Hi, how can i get the inserted id?

local insert = mysql:execute("INSERT INTO lifts (outX, outY , outZ, inX, inY, inZ, Name, outInterior, outDimension, inInterior, inDimension) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", X, Y, Z, inX, inY, inZ, interiorName, currentInterior, currentDimension, interior, dimension)

outputChatBox(tostring(insert.LiftID))

Debug: Boolean value.

Edited by TheMOG
Link to comment

Also what's the problem with this ? I don't  need code, just a help!

addEventHandler("onResourceStart", root, function()
    local result = mysql:singleQuery("SELECT * FROM markers")
    for k, v in pairs(result) do
        outputChatBox(tonumber(v["outX"]).. tonumber(v["outY"]).. tonumber(v["outZ"]))
    end

end)

Debug : attempt to concatenate a nil value

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...