mirror of
https://github.com/darksaid98/overextended.github.io.git
synced 2026-12-02 06:28:54 +00:00
Updated docs for oxmysql
This commit is contained in:
1 parent
b174c89d66
commit
81223ffd47
6 files changed
+60
-19
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user