мНет описания правки
Метка: отменено
мНет описания правки
Метка: ручная отмена
Строка 2: Строка 2:


function p.main(frame)
function p.main(frame)
local result = frame:preprocess([[{{#cargo_query:tables=Persona |fields=COUNT(*)=Count |where=Persona.Image IS NOT NULL''}}]])    local count = tonumber(result:match("%d+"))
local result = frame:preprocess([[{{#cargo_query:tables=Persona |fields=COUNT(*)=Count |where=Persona.Image IS NOT NULL AND Persona.Image<>''}}]])    local count = tonumber(result:match("%d+"))
     return count
     return count
end
end


return p
return p

Версия от 16:13, 28 сентября 2023

Вычисление количества персоналий с фотографиями.


Вызов функции:

{{#invoke:CountPerson|main}}

Значение функции:

1


local p = {}

function p.main(frame)
local result = frame:preprocess([[{{#cargo_query:tables=Persona |fields=COUNT(*)=Count |where=Persona.Image IS NOT NULL AND Persona.Image<>''}}]])    local count = tonumber(result:match("%d+"))
    return count
end

return p