mirror of
https://github.com/darksaid98/oxmysql.git
synced 2026-12-01 14:38:50 +00:00
529 B
529 B
Insert
Execute a query and returns the AUTO_INCREMENT id, if valid.
Usage
exports.oxmysql:insert(query, {}, function(insertId)
print('Inserted new row with id '..insertId)
end)
local insertId = exports.oxmysql:insertSync(query, {})
print('Inserted new row with id '..insertId)
exports.oxmysql.insert(query, {}, (insertId) => {
console.log(`Inserted new row with id ${insertId}`)
})
const insertId = await exports.oxmysql.insertSync(query, {})
console.log(`Inserted new row with id ${insertId}`)