Module:Songs: Difference between revisions

Jump to navigation Jump to search
5 bytes removed ,  Thursday at 01:06
m
no edit summary
mNo edit summary
mNo edit summary
Line 59: Line 59:
limit = '1000',
limit = '1000',
where = 'Album_Songs.singers HOLDS "' .. escaped .. '"',
where = 'Album_Songs.singers HOLDS "' .. escaped .. '"',
orderBy = "Album_Songs.song_title ASC"
orderBy = "Album_Songs.song_page ASC"
}
}
local fields = { 'song_title', 'album', 'type', 'singers' }
local fields = { 'song_page', 'album', 'type', 'singers' }
local results = cargo.query('Album_Songs', table.concat(fields, ','), query)
local results = cargo.query('Album_Songs', table.concat(fields, ','), query)


Line 78: Line 78:


if type ~= nil then
if type ~= nil then
if not groups[result.song_title] then groups[result.song_title] = {} end
if not groups[result.song_page] then groups[result.song_page] = {} end
table.insert(groups[result.song_title], { album = result.album, type = type })
table.insert(groups[result.song_page], { album = result.album, type = type })
end
end
end
end

Navigation menu