Database Function Description of "count_photos"

Name

count_photos

Description

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.

Purpose

To retrieve the total number of photos.

Schema

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';

Related tables

History

Used first

Version 2.5

Used last

Still in use

Change history

= 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';
podoc/count_photos_sql_function.txt · Last modified: 2007/04/23 10:26 by Luud
www.chimeric.de Creative Commons License Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0