Module:Sandbox

local p = {} local cargo = mw.ext.cargo

function p.Main( frame ) local tables = 'nh_house' local fields = "nh_house.villager=villager,nh_house._pageTitle=pageName" -- optional parameters are grouped in one table -- you can omit any or all of them, except join if you use more than one table local args = { where = "nh_house.items LIKE '%\"" .. frame.args['1'] .. "\"%'", orderBy = 'nh_house.name_sort', limit = 300, default = '' }   local print = '' local results = cargo.query( tables, fields, args ) for r = 1, #results, 1 do       print = " " .. results[r].villager .. "" end return print end

return p