podoc:count_photos_by_folder_sql_function
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
podoc:count_photos_by_folder_sql_function [2007/04/12 12:20] – created Luud | podoc:count_photos_by_folder_sql_function [2007/10/19 20:27] (current) – Luud | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== Database Function Description ===== | + | ===== Database Function Description |
=== Name === | === Name === | ||
+ | |||
+ | count_photos_by_folder | ||
=== Description === | === Description === | ||
+ | |||
+ | Count the photos in a particular folder. | ||
=== Purpose === | === Purpose === | ||
+ | |||
+ | To retrieve the number of photos in a particular folder. | ||
=== Schema === | === Schema === | ||
- | === Related tables=== | + | <code sql> |
+ | create function count_photos_by_folder(integer, | ||
+ | select count(identifier) from photo where folder | ||
+ | ' language ' | ||
+ | </ | ||
- | === Related | + | === Related |
- | === Related indexes === | + | * [[photo sql table|photo]] |
=== History === | === History === | ||
Line 29: | Line 39: | ||
= Version 2.5 = | = Version 2.5 = | ||
- | | + | <code sql> |
- | ... | + | create function |
- | ); | + | as ' |
+ | </ | ||
+ | |||
+ | <code sql> | ||
+ | create function count_photos_by_folder(integer, | ||
+ | as ' | ||
+ | </ | ||
+ | |||
+ | = Version 2.34 = | ||
+ | |||
+ | <code sql> | ||
+ | drop function count_photos_by_folder(integer); | ||
+ | drop function count_photos_by_folder(integer, | ||
+ | |||
+ | create or replace function count_photos_by_folder(integer, | ||
+ | select count(identifier) from photo where folder = $1 and can_access_photo(identifier, | ||
+ | ' language ' | ||
+ | </ |
podoc/count_photos_by_folder_sql_function.1176380406.txt.gz · Last modified: 2007/04/12 12:20 by Luud