From f2781a008dc73dff4a766ef73f86ac8b778d4ed7 Mon Sep 17 00:00:00 2001 From: thelindat <65407488+thelindat@users.noreply.github.com> Date: Sun, 24 Oct 2021 16:48:54 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20overexte?= =?UTF-8?q?nded/oxmysql@2b40fafa7f5319ad3cc9eaa3777dde411563255f=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- exports/execute/index.html | 76 ++++++------------------------------- exports/insert/index.html | 66 +++----------------------------- exports/scalar/index.html | 66 +++----------------------------- exports/single/index.html | 66 +++----------------------------- exports/update/index.html | 66 +++----------------------------- search/search_index.json | 2 +- sitemap.xml.gz | Bin 204 -> 204 bytes 7 files changed, 36 insertions(+), 306 deletions(-) diff --git a/exports/execute/index.html b/exports/execute/index.html index b4e7885..0ff202b 100644 --- a/exports/execute/index.html +++ b/exports/execute/index.html @@ -70,11 +70,6 @@
Example
Async
exports.oxmysql:execute('SELECT * FROM users WHERE identifier = ?', {playerIdentifier}, function(result)
if result then
for _, v in pairs(result) do
@@ -529,33 +475,33 @@ When selecting data it will return all matching rows and columns, otherwise it w
end
end)
local result = exports.oxmysql:executeSync('SELECT * FROM users WHERE identifier = ?', {playerIdentifier})
if result then
for _, v in pairs(result) do
print(v.identifier, v.firstname, v.lastname)
end
end
-Async
exports.oxmysql.execute('SELECT * FROM users WHERE identifier = ?', [playerIdentifier], function(result) {
-if (result) {
+ if (result) {
result.forEach((v) => {
- console.log(v.identifier, v.firstname, v.lastname)
+ console.log(v.identifier, v.firstname, v.lastname)
})
-}
+ }
})
const result = exports.oxmysql.executeSync('SELECT * FROM users WHERE identifier = ?', [playerIdentifier]) {
if (result) {
-result.forEach((v) => {
+ result.forEach((v) => {
console.log(v.identifier, v.firstname, v.lastname)
-})
+ })
}
-Example
Async
exports.oxmysql:insert('INSERT INTO users (identifier, firstname, lastname) VALUES (?, ?, ?) ', {playerIdentifier, firstName, lastName}, function(id)
if id then
print(id)
end
end)
local id = exports.oxmysql:insertSync('INSERT INTO users (identifier, firstname, lastname) VALUES (?, ?, ?) ', {playerIdentifier, firstName, lastName})
if id then
print(id)
end
-Async
exports.oxmysql.insert('INSERT INTO users (identifier, firstname, lastname) VALUES (?, ?, ?) ', [playerIdentifier, firstName, lastName], function(id) {
if (id)
console.log(id)
})
const id = exports.oxmysql.insertSync('INSERT INTO users (identifier, firstname, lastname) VALUES (?, ?, ?) ', [playerIdentifier, firstName, lastName]) {
if (id)
console.log(id)
-Example
Async
exports.oxmysql:scalar('SELECT firstname FROM users WHERE identifier = ?', {playerIdentifier}, function(result)
if result then
print(result.firstname)
end
end)
local result = exports.oxmysql:scalarSync('SELECT firstname FROM users WHERE identifier = ?', {playerIdentifier})
if result then
print(result.firstname)
end
-Async
exports.oxmysql.scalar('SELECT firstname FROM users WHERE identifier = ?', [playerIdentifier], function(result) {
if (result)
console.log(result.firstname)
})
const result = exports.oxmysql.scalarSync('SELECT firstname FROM users WHERE identifier = ?', [playerIdentifier]) {
if (result)
console.log(result.firstname)
-Example
Async
exports.oxmysql:single('SELECT * FROM users WHERE identifier = ?', {playerIdentifier}, function(result)
if result then
print(result.identifier, result.firstname, result.lastname)
end
end)
local result = exports.oxmysql:singleSync('SELECT * FROM users WHERE identifier = ?', {playerIdentifier})
if result then
print(result.identifier, result.firstname, result.lastname)
end
-Async
exports.oxmysql.single('SELECT * FROM users WHERE identifier = ?', [playerIdentifier], function(result) {
if (result)
console.log(result.identifier, result.firstname, result.lastname)
})
const result = exports.oxmysql.singleSync('SELECT * FROM users WHERE identifier = ?', [playerIdentifier]) {
if (result)
console.log(result.identifier, result.firstname, result.lastname)
-Example
Async
exports.oxmysql:insert('UPDATE users SET firstname = ? WHERE identifier = ? ', {newName, playerIdentifier}, function(affectedRows)
if affectedRows then
print(affectedRows)
end
end)
local id = exports.oxmysql:insertSync('UPDATE users SET firstname = ? WHERE identifier = ? ', {newName, playerIdentifier})
if affectedRows then
print(affectedRows)
end
-Async
exports.oxmysql.insert('UPDATE users SET firstname = ? WHERE identifier = ? ', [newName, playerIdentifier], function(affectedRows) {
if (affectedRows)
console.log(affectedRows)
})
const id = exports.oxmysql.insertSync('UPDATE users SET firstname = ? WHERE identifier = ? ', [newName, playerIdentifier]) {
if (affectedRows)
console.log(affectedRows)
-