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

+7 -7
View File
@@ -5,8 +5,8 @@ Generic function that can be utilised for any query, synonymous with fetch.
When selecting data it will return all matching rows and columns, otherwise it will return field data such as insertid, affectedRows, etc.
!!! info "Example"
=== "Lua
=== "Async"
=== "Lua"
**Async**
```lua
exports.oxmysql:execute('SELECT * FROM users WHERE identifier = ?', {playerIdentifier}, function(result)
if result then
@@ -16,7 +16,7 @@ When selecting data it will return all matching rows and columns, otherwise it w
end
end)
```
=== "Sync"
**Sync**
```lua
local result = exports.oxmysql:executeSync('SELECT * FROM users WHERE identifier = ?', {playerIdentifier})
if result then
@@ -25,18 +25,18 @@ When selecting data it will return all matching rows and columns, otherwise it w
end
end
```
=== "JavaScript
=== "Async"
=== "JavaScript"
**Async**
```js
exports.oxmysql.execute('SELECT * FROM users WHERE identifier = ?', [playerIdentifier], function(result) {
if (result) {
result.forEach((v) => {
console.log(v.identifier, v.firstname, v.lastname)
})
})
}
})
```
=== "Sync"
**Sync**
```js
const result = exports.oxmysql.executeSync('SELECT * FROM users WHERE identifier = ?', [playerIdentifier]) {
if (result) {