podoc:count_photo_versions_by_user_sql_function
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
podoc:count_photo_versions_by_user_sql_function [2007/04/16 15:20] – created Luud | podoc:count_photo_versions_by_user_sql_function [2007/04/23 14:26] (current) – Luud | ||
---|---|---|---|
Line 6: | Line 6: | ||
=== Description === | === Description === | ||
+ | |||
+ | Count the total number of photo versions of a particular user. | ||
=== Purpose === | === Purpose === | ||
+ | |||
+ | To retrieve the total number of photo versions of a particular user. | ||
=== Schema === | === Schema === | ||
- | < | + | < |
create function count_photo_versions_by_user(integer) returns bigint | create function count_photo_versions_by_user(integer) returns bigint | ||
- | as ' | + | as ' |
+ | where photo_version.photo=photo.identifier and photo.users = $1' language ' | ||
</ | </ | ||
=== Related tables === | === Related tables === | ||
- | === Related indexes === | + | * [[photo sql table|photo]] |
- | + | * [[photo_version sql table|photo_version]] | |
- | === Related functions === | + | |
- | + | ||
- | === Related views === | + | |
=== History === | === History === | ||
Line 38: | Line 40: | ||
= Version 2.13 = | = Version 2.13 = | ||
- | < | + | < |
create function count_photo_versions_by_user(integer) returns bigint | create function count_photo_versions_by_user(integer) returns bigint | ||
- | as ' | + | as ' |
+ | where photo_version.photo=photo.identifier and photo.users = $1' language ' | ||
</ | </ | ||
podoc/count_photo_versions_by_user_sql_function.1176736818.txt.gz · Last modified: 2007/04/16 15:20 by Luud