User Tools

Site Tools


podoc:count_photo_versions_by_user_sql_function

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
podoc:count_photo_versions_by_user_sql_function [2007/04/16 15:20] – created Luudpodoc: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 ===
  
-<code>+<code sql>
 create function count_photo_versions_by_user(integer) returns bigint create function count_photo_versions_by_user(integer) returns bigint
-as 'select count(photo_version.identifier) from photo_version, photo where photo_version.photo=photo.identifier and photo.users = $1' language 'sql';+as 'select count(photo_version.identifier) from photo_version, photo 
 +where photo_version.photo=photo.identifier and photo.users = $1' language 'sql';
 </code> </code>
  
 === 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 =
  
-<code>+<code sql>
 create function count_photo_versions_by_user(integer) returns bigint create function count_photo_versions_by_user(integer) returns bigint
-as 'select count(photo_version.identifier) from photo_version, photo where photo_version.photo=photo.identifier and photo.users = $1' language 'sql';+as 'select count(photo_version.identifier) from photo_version, photo 
 +where photo_version.photo=photo.identifier and photo.users = $1' language 'sql';
 </code> </code>
  
podoc/count_photo_versions_by_user_sql_function.1176736818.txt.gz · Last modified: 2007/04/16 15:20 by Luud