mirror of
https://github.com/darksaid98/overextended.github.io.git
synced 2026-12-02 06:28:54 +00:00
keywords
This commit is contained in:
1 parent
daf6a505fc
commit
d2753fb2fd
10 files changed
+47
-10
No files matched your search
@@ -1,3 +1,7 @@
|
||||
---
|
||||
keywords: ['execute']
|
||||
---
|
||||
|
||||
# Update
|
||||
|
||||
Returns the number of affected rows by the query.
|
||||
@@ -40,9 +44,9 @@ end
|
||||
|
||||
MySQL.update('UPDATE users SET firstname = ? WHERE identifier = ? ', [newName, playerIdentifier], (affectedRows) => {
|
||||
if (affectedRows) {
|
||||
console.log(affectedRows)
|
||||
console.log(affectedRows);
|
||||
}
|
||||
})
|
||||
});
|
||||
```
|
||||
|
||||
### Promise
|
||||
@@ -50,8 +54,8 @@ MySQL.update('UPDATE users SET firstname = ? WHERE identifier = ? ', [newName, p
|
||||
```js
|
||||
// alias: exports.oxmysql.update_async
|
||||
|
||||
const id = MySQL.update('UPDATE users SET firstname = ? WHERE identifier = ? ', [newName, playerIdentifier])
|
||||
const id = MySQL.update('UPDATE users SET firstname = ? WHERE identifier = ? ', [newName, playerIdentifier]);
|
||||
if (affectedRows) {
|
||||
console.log(affectedRows)
|
||||
console.log(affectedRows);
|
||||
}
|
||||
```
|
||||
Reference in new issue
Block a user