exports.oxmysql:ready(function()
local data = exports.oxmysql:executeSync('SELECT * FROM motels')
for i = 1, #data, 1 do
local motelNo, roomNo = sepItemData(data.id)
local rooms = json.decode(data.data)
Motels[motelNo].rooms[roomNo].owner = data.identifier
Motels[motelNo].rooms[roomNo].door.lock = rooms.door.lock
Motels[motelNo].rooms[roomNo].stash.lock = rooms.stash.lock
Motels[motelNo].rooms[roomNo].key = data.keyData
end
end)