Update and rename fetch.md to execute.md

This commit is contained in:
Linden authored and GitHub committed 2021-09-19 07:06:54 +10:00
1 parent 1b8b6fd2de
commit 2867b16aac
1 file changed
+2 -2
+14
View File
@@ -0,0 +1,14 @@
# Execute
Execute a query and returns an array of all results. This is synonymous with the deprecated fetch.
### 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'])
```