Updated docs for oxmysql

This commit is contained in:
userMacieG committed 2022-03-22 17:46:46 +01:00
1 parent b174c89d66
commit 81223ffd47
6 files changed
+60 -19

No files matched your search

+4 -4
View File
@@ -6,9 +6,9 @@ Returns the number of affected rows by the query.
### Callback
```lua
-- Alias: exports.oxmysql:update
-- Alias: MySQL.Async.update
-- Alias: MySQL.Async.execute
MySQL.Async.update('UPDATE users SET firstname = ? WHERE identifier = ? ', {newName, playerIdentifier}, function(affectedRows)
MySQL.update('UPDATE users SET firstname = ? WHERE identifier = ?', {newName, playerIdentifier}, function(affectedRows)
if affectedRows then
print(affectedRows)
end
@@ -18,10 +18,10 @@ end)
### Promise
```lua
-- Alias: exports.oxmysql:update_async
-- Alias: MySQL.update
-- Alias: MySQL.Sync.execute
CreateThread(function()
local affectedRows = MySQL.update.await('UPDATE users SET firstname = ? WHERE identifier = ? ', {newName, playerIdentifier})
local affectedRows = MySQL.update.await('UPDATE users SET firstname = ? WHERE identifier = ?', {newName, playerIdentifier})
if affectedRows then
print(affectedRows)
end