mirror of
https://github.com/darksaid98/oxmysql.git
synced 2026-12-04 06:28:53 +00:00
Include some js samples
This commit is contained in:
1 parent
7ac73ccdb4
commit
93754a8efc
6 files changed
+60
-26
No files matched your search
@@ -6,9 +6,15 @@ Execute a query and return the result of the first row and column.
|
||||
exports.oxmysql:scalar(query, {}, function(result)
|
||||
print(result)
|
||||
end)
|
||||
print('I will be printed before query result')
|
||||
```
|
||||
```lua
|
||||
|
||||
local result = exports.oxmysql:scalarSync(query, {})
|
||||
print(result)
|
||||
```
|
||||
```js
|
||||
exports.oxmysql.scalar(query, {}, (result) => {
|
||||
console.log(result)
|
||||
})
|
||||
|
||||
const result = await exports.oxmysql.scalarSync(query, {})
|
||||
console.log(result)
|
||||
```
|
||||
Reference in new issue
Block a user