mirror of
https://github.com/darksaid98/overextended.github.io.git
synced 2026-12-02 22:22:46 +00:00
update oxmysql js usage
and somewhat clean up transaction docs
This commit is contained in:
1 parent
1363afcd2a
commit
3d627ba762
8 files changed
+178
-81
No files matched your search
@@ -26,13 +26,17 @@ print(firstname)
|
||||
|
||||
### Callback
|
||||
```js
|
||||
exports.oxmysql.scalar('SELECT firstname FROM users WHERE identifier = ?', [playerIdentifier], (firstname) => {
|
||||
// alias: exports.oxmysql.scalar
|
||||
|
||||
MySQL.scalar('SELECT firstname FROM users WHERE identifier = ?', [playerIdentifier], (firstname) => {
|
||||
console.log(firstname)
|
||||
})
|
||||
```
|
||||
|
||||
### Promise
|
||||
```js
|
||||
const firstname = await exports.oxmysql.scalar_async('SELECT firstname FROM users WHERE identifier = ?', [playerIdentifier])
|
||||
// alias: exports.oxmysql.scalar_async
|
||||
|
||||
const firstname = await MySQL.scalar('SELECT firstname FROM users WHERE identifier = ?', [playerIdentifier])
|
||||
console.log(firstname)
|
||||
```
|
||||
Reference in new issue
Block a user