From 37dd5cc761f921b12ff58adaa2b5f27c2acc0e95 Mon Sep 17 00:00:00 2001 From: Linden <65407488+thelindat@users.noreply.github.com> Date: Wed, 18 Aug 2021 14:17:22 +1000 Subject: [PATCH] Create fetch.md --- fetch.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 fetch.md diff --git a/fetch.md b/fetch.md new file mode 100644 index 0000000..1e01f79 --- /dev/null +++ b/fetch.md @@ -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']) +```