Create fetch.md

This commit is contained in:
Linden authored and GitHub committed 2021-08-18 14:17:22 +10:00
1 parent 9c4eb9814d
commit 37dd5cc761
1 file changed
+14
+14
View File
@@ -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'])
```