User Tools

Site Tools


podoc:number_of_film_references_sql_function

Differences

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

Link to this comparison view

Next revision
Previous revision
podoc:number_of_film_references_sql_function [2007/04/12 12:21] – created Luudpodoc:number_of_film_references_sql_function [2007/04/23 14:30] (current) Luud
Line 1: Line 1:
-===== Database Function Description =====+===== Database Function Description of "number_of_film_references" =====
  
 === Name === === Name ===
 +
 +number_of_film_references
  
 === Description === === Description ===
 +
 +Counts the number of references for a particular film.
 +
 +// Tentative (is this correct?): // this represents the number of photos in the database captured on the specified film.
  
 === Purpose === === Purpose ===
 +
 +To retrieve the number of references to a particular film.
  
 === Schema === === Schema ===
  
-=== Related tables===+<code sql> 
 +create function number_of_film_references(integer) returns bigint 
 +as 'select count(photo_tech.identifier) 
 +      from photo_tech, film 
 +     where photo_tech.film=film.identifier 
 +       and film.identifier $1' language 'sql'; 
 +</code>
  
-=== Related sequences ===+=== Related tables ===
  
-=== Related indexes ===+  * [[film sql table|film]] 
 +  * [[photo_tech sql table|photo_tech]]
  
 === History === === History ===
Line 29: Line 44:
 = Version 2.5 = = Version 2.5 =
  
-  create function ... +<code sql> 
-    ...   +create function number_of_film_references(integer) returns bigint 
-  );+as 'select count(photo_tech.identifier) 
 +      from photo_tech, film 
 +     where photo_tech.film=film.identifier 
 +       and film.identifier = $1' language 'sql'; 
 +</code> 
podoc/number_of_film_references_sql_function.1176380466.txt.gz · Last modified: 2007/04/12 12:21 by Luud