functionGetPlayerProperties(cid,cb)local data = MySQL.query.await('SELECT id, enter FROM ak47_qb_housing where owner = ?', {cid})local result = {}for i, v inpairs(data) dotable.insert(result, { label ='HID: '..v.id, coords = json.encode({enter = json.decode(v.enter)}) })endreturn resultend
Path: ps-mdt/server/main.lua
Replace: GetPlayerPropertiesByCitizenId
functionGetPlayerPropertiesByCitizenId(citizenid)local properties = {}local result = MySQL.Sync.fetchAll("SELECT * FROM ak47_qb_housing WHERE owner = @citizenid", { ['@citizenid'] = citizenid })if result and#result >0thenfor i =1, #result dotable.insert(properties, { label ='HID: '..result[i].id, coords = json.encode({enter = json.decode(result[i].enter)}) })endendreturn propertiesend