mirror of
https://github.com/darksaid98/oxmysql.git
synced 2026-12-03 14:38:50 +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
@@ -4,11 +4,17 @@ Execute a query and return the results of the first row.
|
||||
### Usage
|
||||
```lua
|
||||
exports.oxmysql:single(query, {}, function(result)
|
||||
print(result['column'])
|
||||
print(result.column1, result.column2)
|
||||
end)
|
||||
print('I will be printed before query result')
|
||||
```
|
||||
```lua
|
||||
|
||||
local result = exports.oxmysql:singleSync(query, {})
|
||||
print(result['column'])
|
||||
print(result.column1, result.column2)
|
||||
```
|
||||
```js
|
||||
exports.oxmysql.single(query, {}, (result) => {
|
||||
console.log(result.column1, result.column2)
|
||||
})
|
||||
|
||||
const result = await exports.oxmysql.singleSync(query, {})
|
||||
console.log(result.column1, result.column2)
|
||||
```
|
||||
Reference in new issue
Block a user