11-27-2014, 01:25 AM
Finally i got what i wanted. The "nrows" was the correct one for me.
The ingame command calls the handle function:
Inside handle function the GetList function is called, which will return a nested table with all player data:
This is working well for me. Lets see what comes next
The ingame command calls the handle function:
function HandleHomeListCommand(a_split, player)
a_List = g_Storage:GetList(player:GetName())
for i=1,#a_List do
local msg = cChatColor.Green .. i .. ". " .. a_List[i].Name .. " @ " .. a_List[i].World
player:SendMessage(msg)
end
return true
end
Inside handle function the GetList function is called, which will return a nested table with all player data:
function cStorage:GetList( player )
local a_List = {}
local sql = "SELECT * FROM " .. PluginName .. " WHERE Player='" .. player .. "'"
for rowData in self.DB:nrows(sql) do
a_List[#a_List+1] = rowData
end
return a_List
end
This is working well for me. Lets see what comes next

