Skip to content

Commit

Permalink
fix(server/storage): CID to CID column
Browse files Browse the repository at this point in the history
* Update storage.lua

fix for #232

* Update storage.lua

* Update server/storage.lua

Co-authored-by: Manason <clanerp@gmail.com>

---------

Co-authored-by: Manason <clanerp@gmail.com>
  • Loading branch information
SKITTLE6969 and Manason authored Nov 11, 2023
1 parent eb9e381 commit 2c0014f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion server/storage.lua
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,9 @@ end

---@param request UpsertPlayerRequest
function UpsertPlayerEntity(request)
MySQL.insert.await('INSERT INTO players (citizenid, license, name, money, charinfo, job, gang, position, metadata) VALUES (:citizenid, :license, :name, :money, :charinfo, :job, :gang, :position, :metadata) ON DUPLICATE KEY UPDATE name = :name, money = :money, charinfo = :charinfo, job = :job, gang = :gang, position = :position, metadata = :metadata', {
MySQL.insert.await('INSERT INTO players (citizenid, cid, license, name, money, charinfo, job, gang, position, metadata) VALUES (:citizenid, :cid, :license, :name, :money, :charinfo, :job, :gang, :position, :metadata) ON DUPLICATE KEY UPDATE name = :name, money = :money, charinfo = :charinfo, job = :job, gang = :gang, position = :position, metadata = :metadata', {
citizenid = request.playerEntity.citizenid,
cid = request.playerEntity.charinfo.cid,
license = request.playerEntity.license,
name = request.playerEntity.name,
money = json.encode(request.playerEntity.money),
Expand Down

0 comments on commit 2c0014f

Please sign in to comment.