mirror of
https://github.com/darksaid98/oxmysql.git
synced 2026-12-04 06:28:53 +00:00
Fix formatting
This commit is contained in:
1 parent
5bcec3a0b1
commit
2b40fafa7f
7 files changed
+39
-40
No files matched your search
@@ -4,8 +4,8 @@ title: Scalar
|
||||
Returns the first column for a single row.
|
||||
|
||||
!!! info "Example"
|
||||
=== "Lua
|
||||
=== "Async"
|
||||
=== "Lua"
|
||||
**Async**
|
||||
```lua
|
||||
exports.oxmysql:scalar('SELECT firstname FROM users WHERE identifier = ?', {playerIdentifier}, function(result)
|
||||
if result then
|
||||
@@ -13,22 +13,22 @@ Returns the first column for a single row.
|
||||
end
|
||||
end)
|
||||
```
|
||||
=== "Sync"
|
||||
**Sync**
|
||||
```lua
|
||||
local result = exports.oxmysql:scalarSync('SELECT firstname FROM users WHERE identifier = ?', {playerIdentifier})
|
||||
if result then
|
||||
print(result.firstname)
|
||||
end
|
||||
```
|
||||
=== "JavaScript
|
||||
=== "Async"
|
||||
=== "JavaScript"
|
||||
**Async**
|
||||
```js
|
||||
exports.oxmysql.scalar('SELECT firstname FROM users WHERE identifier = ?', [playerIdentifier], function(result) {
|
||||
if (result)
|
||||
console.log(result.firstname)
|
||||
})
|
||||
```
|
||||
=== "Sync"
|
||||
**Sync**
|
||||
```js
|
||||
const result = exports.oxmysql.scalarSync('SELECT firstname FROM users WHERE identifier = ?', [playerIdentifier]) {
|
||||
if (result)
|
||||
|
||||
Reference in new issue
Block a user