mirror of
https://github.com/darksaid98/overextended.github.io.git
synced 2026-12-02 06:28:54 +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
@@ -30,7 +30,9 @@ end
|
||||
|
||||
### Callback
|
||||
```js
|
||||
exports.oxmysql.update('UPDATE users SET firstname = ? WHERE identifier = ? ', [newName, playerIdentifier], (affectedRows) => {
|
||||
// alias: exports.oxmysql.update
|
||||
|
||||
MySQL.update('UPDATE users SET firstname = ? WHERE identifier = ? ', [newName, playerIdentifier], (affectedRows) => {
|
||||
if (affectedRows) {
|
||||
console.log(affectedRows)
|
||||
}
|
||||
@@ -39,7 +41,9 @@ exports.oxmysql.update('UPDATE users SET firstname = ? WHERE identifier = ? ', [
|
||||
|
||||
### Promise
|
||||
```js
|
||||
const id = exports.oxmysql.update_async('UPDATE users SET firstname = ? WHERE identifier = ? ', [newName, playerIdentifier])
|
||||
// alias: exports.oxmysql.update_async
|
||||
|
||||
const id = MySQL.update('UPDATE users SET firstname = ? WHERE identifier = ? ', [newName, playerIdentifier])
|
||||
if (affectedRows) {
|
||||
console.log(affectedRows)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user