mirror of
https://github.com/darksaid98/oxmysql.git
synced 2026-12-02 22:22:50 +00:00
Fix formatting
This commit is contained in:
1 parent
5bcec3a0b1
commit
2b40fafa7f
7 files changed
+39
-40
No files matched your search
@@ -4,8 +4,8 @@ title: Insert
|
||||
Inserts a new entry into the database and returns the insert id for the row, if valid.
|
||||
|
||||
!!! info "Example"
|
||||
=== "Lua
|
||||
=== "Async"
|
||||
=== "Lua"
|
||||
**Async**
|
||||
```lua
|
||||
exports.oxmysql:insert('INSERT INTO users (identifier, firstname, lastname) VALUES (?, ?, ?) ', {playerIdentifier, firstName, lastName}, function(id)
|
||||
if id then
|
||||
@@ -13,22 +13,22 @@ Inserts a new entry into the database and returns the insert id for the row, if
|
||||
end
|
||||
end)
|
||||
```
|
||||
=== "Sync"
|
||||
**Sync**
|
||||
```lua
|
||||
local id = exports.oxmysql:insertSync('INSERT INTO users (identifier, firstname, lastname) VALUES (?, ?, ?) ', {playerIdentifier, firstName, lastName})
|
||||
if id then
|
||||
print(id)
|
||||
end
|
||||
```
|
||||
=== "JavaScript
|
||||
=== "Async"
|
||||
=== "JavaScript"
|
||||
**Async**
|
||||
```js
|
||||
exports.oxmysql.insert('INSERT INTO users (identifier, firstname, lastname) VALUES (?, ?, ?) ', [playerIdentifier, firstName, lastName], function(id) {
|
||||
if (id)
|
||||
console.log(id)
|
||||
})
|
||||
```
|
||||
=== "Sync"
|
||||
**Sync**
|
||||
```js
|
||||
const id = exports.oxmysql.insertSync('INSERT INTO users (identifier, firstname, lastname) VALUES (?, ?, ?) ', [playerIdentifier, firstName, lastName]) {
|
||||
if (id)
|
||||
|
||||
Reference in new issue
Block a user