mirror of
https://github.com/darksaid98/overextended.github.io.git
synced 2026-12-02 06:28:54 +00:00
1.2 KiB
1.2 KiB
title
| title |
|---|
| Single |
import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem';
Returns all selected columns for a single row.
Promise
local row = MySQL.single.await('SELECT `firstname`, `lastname` FROM `users` WHERE `identifier` = ? LIMIT 1', {
identifier
})
if not row then return end
print(row.firstname, row.lastname)
const row = await MySQL.single('SELECT `firstname`, `lastname` FROM `users` WHERE `identifier` = ? LIMIT 1', [
identifier
])
if (!row) return;
console.log(row.firstname, row.lastname)
Aliases
exports.oxmysql.single_async
Callback
MySQL.single('SELECT `firstname`, `lastname` FROM `users` WHERE `identifier` = ? LIMIT 1', {
identifier
}, function(row)
if not row then return end
print(row.firstname, row.lastname)
end)
MySQL.single('SELECT `firstname`, `lastname` FROM `users` WHERE `identifier` = ? LIMIT 1', [
identifier
], (row) => {
if (!row) return;
console.log(row.firstname, row.lastname)
})
Aliases
exports.oxmysql.single