podoc:count_photos_by_folder_sql_function
This is an old revision of the document!
Database Function Description of "count_photos_by_folder"
Name
count_photos_by_folder
Description
Count the photos in a particular folder.
There are two versions, one that counts all photos and one that counts only those photos up to a given access rights setting.
Purpose
To retrieve the number of photos in a particular folder.
Schema
create function count_photos_by_folder(integer) returns bigint as 'select count(identifier) from photo where folder = $1' language 'sql';
create function count_photos_by_folder(integer, integer) returns bigint as 'select count(identifier) from photo where folder = $1 and access_rights <= $2' language 'sql';
Related tables
History
Used first
Version 2.5
Used last
Still in use
Change history
= Version 2.5 =
create function count_photos_by_folder(integer) returns bigint as 'select count(identifier) from photo where folder = $1' language 'sql';
create function count_photos_by_folder(integer, integer) returns bigint as 'select count(identifier) from photo where folder = $1 and access_rights <= $2' language 'sql';
podoc/count_photos_by_folder_sql_function.1176902723.txt.gz · Last modified: 2007/04/18 13:25 by Luud