mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-28 23:01:26 +00:00
Merge pull request #1819 from seltonmt012/fix/additems-db-insert
fix(es_extended/server/functions): persist items added via AddItems
This commit is contained in:
@@ -805,9 +805,15 @@ if not Config.CustomInventory then
|
|||||||
end
|
end
|
||||||
|
|
||||||
if #toInsert > 0 then
|
if #toInsert > 0 then
|
||||||
|
local parameters = {}
|
||||||
|
for i = 1, #toInsert do
|
||||||
|
local row = toInsert[i]
|
||||||
|
parameters[i] = { row.name, row.label, row.weight, row.rare, row.canRemove }
|
||||||
|
end
|
||||||
|
|
||||||
MySQL.prepare.await(
|
MySQL.prepare.await(
|
||||||
"INSERT IGNORE INTO `items` (`name`, `label`, `weight`, `rare`, `can_remove`) VALUES (?, ?, ?, ?, ?)",
|
"INSERT IGNORE INTO `items` (`name`, `label`, `weight`, `rare`, `can_remove`) VALUES (?, ?, ?, ?, ?)",
|
||||||
toInsert)
|
parameters)
|
||||||
|
|
||||||
for i = 1, #toInsert do
|
for i = 1, #toInsert do
|
||||||
local row = toInsert[i]
|
local row = toInsert[i]
|
||||||
|
|||||||
Reference in New Issue
Block a user