mirror of
https://github.com/darksaid98/oxmysql.git
synced 2026-12-03 22:20:56 +00:00
Create insert.md
This commit is contained in:
1 parent
466f222c3b
commit
aae887869b
1 file changed
+14
@@ -0,0 +1,14 @@
|
|||||||
|
# Insert
|
||||||
|
Execute a query and returns the AUTO_INCREMENT id, if it is defined.
|
||||||
|
|
||||||
|
### Usage
|
||||||
|
```lua
|
||||||
|
exports.oxmysql:insert(query, {}, function(insertId)
|
||||||
|
print('Inserted new row with id '..insertId)
|
||||||
|
end)
|
||||||
|
print('I will be printed before query result')
|
||||||
|
```
|
||||||
|
```lua
|
||||||
|
local insertId = exports.oxmysql:insertSync(query, {})
|
||||||
|
print('Inserted new row with id '..insertId)
|
||||||
|
```
|
||||||
Reference in new issue
Block a user