SQL2 error fix

This commit is contained in:
Tony
2021-09-13 03:05:03 -04:00
parent c1eadcc827
commit 2d2a33b1be
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -442,7 +442,7 @@ QBCore.Player.Save = function(source)
-- TODO: Merge these 3 queries into 1 with an on duplicate (citizenid isn't primary so https://stackoverflow.com/a/33495408/3200040 might need to be used)
local result = exports.oxmysql:fetchSync('SELECT * FROM players WHERE citizenid = ?', { PlayerData.citizenid })
if result[1] == nil then
exports.oxmysql:insert('INSERT INTO players (citizenid, cid, license, name, money, charinfo, job, gang, position, metadata) VALUES (?)', {
exports.oxmysql:insert('INSERT INTO players (citizenid, cid, license, name, money, charinfo, job, gang, position, metadata) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)', {
PlayerData.citizenid,
tonumber(PlayerData.cid),
PlayerData.license,