mirror of
https://github.com/darksaid98/oxmysql.git
synced 2026-12-02 14:38:50 +00:00
Rename directory and fix JS Sync examples
This commit is contained in:
1 parent
2b40fafa7f
commit
9af6205bb7
8 files changed
+3
-3
No files matched your search
@@ -38,7 +38,7 @@ When selecting data it will return all matching rows and columns, otherwise it w
|
||||
```
|
||||
**Sync**
|
||||
```js
|
||||
const result = exports.oxmysql.executeSync('SELECT * FROM users WHERE identifier = ?', [playerIdentifier]) {
|
||||
const result = await exports.oxmysql.executeSync('SELECT * FROM users WHERE identifier = ?', [playerIdentifier]) {
|
||||
if (result) {
|
||||
result.forEach((v) => {
|
||||
console.log(v.identifier, v.firstname, v.lastname)
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -30,7 +30,7 @@ Returns the first column for a single row.
|
||||
```
|
||||
**Sync**
|
||||
```js
|
||||
const result = exports.oxmysql.scalarSync('SELECT firstname FROM users WHERE identifier = ?', [playerIdentifier]) {
|
||||
const result = await exports.oxmysql.scalarSync('SELECT firstname FROM users WHERE identifier = ?', [playerIdentifier]) {
|
||||
if (result)
|
||||
console.log(result.firstname)
|
||||
```
|
||||
@@ -30,7 +30,7 @@ Returns the columns for a single row.
|
||||
```
|
||||
**Sync**
|
||||
```js
|
||||
const result = exports.oxmysql.singleSync('SELECT * FROM users WHERE identifier = ?', [playerIdentifier]) {
|
||||
const result = await exports.oxmysql.singleSync('SELECT * FROM users WHERE identifier = ?', [playerIdentifier]) {
|
||||
if (result)
|
||||
console.log(result.identifier, result.firstname, result.lastname)
|
||||
```
|
||||
File renamed without changes.
File renamed without changes.
Reference in new issue
Block a user