count_photos
Count the total number of photos.
There are two versions, one that counts all photos and one that counts only those photos up to a given access rights setting.
To retrieve the total number of photos.
CREATE FUNCTION count_photos() returns bigint AS 'select count(identifier) from photo' LANGUAGE 'sql';
CREATE FUNCTION count_photos(integer) returns bigint AS 'select count(identifier) from photo where access_rights <= $1' LANGUAGE 'sql';
Version 2.5
Still in use
= Version 2.5 =
CREATE FUNCTION count_photos() returns bigint AS 'select count(identifier) from photo' LANGUAGE 'sql';
CREATE FUNCTION count_photos(integer) returns bigint AS 'select count(identifier) from photo where access_rights <= $1' LANGUAGE 'sql';