mirror of
https://github.com/darksaid98/oxmysql.git
synced 2026-12-04 06:28:53 +00:00
Create fetch.md
This commit is contained in:
1 parent
9c4eb9814d
commit
37dd5cc761
1 file changed
+14
@@ -0,0 +1,14 @@
|
|||||||
|
# Fetch
|
||||||
|
Execute a query and returns the results of all rows and columns.
|
||||||
|
|
||||||
|
### Usage
|
||||||
|
```lua
|
||||||
|
exports.oxmysql:fetch(query, {}, function(result)
|
||||||
|
print(result[1]['column1'], result[1]['column2'], result[2]['column1'], result[2]['column2'])
|
||||||
|
end)
|
||||||
|
print('I will be printed before query result')
|
||||||
|
```
|
||||||
|
```lua
|
||||||
|
local result = exports.oxmysql:fetchSync(query, {})
|
||||||
|
print(result[1]['column1'], result[1]['column2'], result[2]['column1'], result[2]['column2'])
|
||||||
|
```
|
||||||
Reference in new issue
Block a user