Модуль:CountPerson: различия между версиями
Admin (обсуждение | вклад) Новая страница: «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» |
Admin (обсуждение | вклад) мНет описания правки Метка: отменено |
||
| Строка 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 result = frame:preprocess([[{{#cargo_query:tables=Persona |fields=COUNT(*)=Count |where=Persona.Image IS NOT NULL''}}]]) local count = tonumber(result:match("%d+")) | ||
return count | return count | ||
end | end | ||
return p | return p | ||
Версия от 16:12, 28 сентября 2023
Вычисление количества персоналий с фотографиями.
Вызов функции:
{{#invoke:CountPerson|main}}
Значение функции:
1064