Fix formatting

This commit is contained in:
Linden committed 2021-10-25 03:48:14 +11:00
1 parent 5bcec3a0b1
commit 2b40fafa7f
7 files changed
+39 -40

No files matched your search

+6 -6
View File
@@ -4,8 +4,8 @@ title: Update
Updates an entry in the database and returns the number of affected rows.
!!! info "Example"
=== "Lua
=== "Async"
=== "Lua"
**Async**
```lua
exports.oxmysql:insert('UPDATE users SET firstname = ? WHERE identifier = ? ', {newName, playerIdentifier}, function(affectedRows)
if affectedRows then
@@ -13,22 +13,22 @@ Updates an entry in the database and returns the number of affected rows.
end
end)
```
=== "Sync"
**Sync**
```lua
local id = exports.oxmysql:insertSync('UPDATE users SET firstname = ? WHERE identifier = ? ', {newName, playerIdentifier})
if affectedRows then
print(affectedRows)
end
```
=== "JavaScript
=== "Async"
=== "JavaScript"
**Async**
```js
exports.oxmysql.insert('UPDATE users SET firstname = ? WHERE identifier = ? ', [newName, playerIdentifier], function(affectedRows) {
if (affectedRows)
console.log(affectedRows)
})
```
=== "Sync"
**Sync**
```js
const id = exports.oxmysql.insertSync('UPDATE users SET firstname = ? WHERE identifier = ? ', [newName, playerIdentifier]) {
if (affectedRows)