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