From aae887869bff606321c440a814c077c8a0a56dff Mon Sep 17 00:00:00 2001 From: Linden <65407488+thelindat@users.noreply.github.com> Date: Wed, 18 Aug 2021 14:09:44 +1000 Subject: [PATCH] Create insert.md --- insert.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 insert.md diff --git a/insert.md b/insert.md new file mode 100644 index 0000000..6c2a200 --- /dev/null +++ b/insert.md @@ -0,0 +1,14 @@ +# Insert +Execute a query and returns the AUTO_INCREMENT id, if it is defined. + +### Usage +```lua +exports.oxmysql:insert(query, {}, function(insertId) + print('Inserted new row with id '..insertId) +end) +print('I will be printed before query result') +``` +```lua +local insertId = exports.oxmysql:insertSync(query, {}) +print('Inserted new row with id '..insertId) +```