User Tools

Site Tools


podoc:number_of_camera_references_sql_function

Differences

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

Link to this comparison view

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