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

Both sides previous revisionPrevious revision
Next revision
Previous revision
podoc:number_of_camera_references_sql_function [2007/04/12 16:21] Luudpodoc:number_of_camera_references_sql_function [2007/04/23 14:30] (current) Luud
Line 1: Line 1:
-===== Database Sequence Description of "number_of_camera_references" =====+===== Database Function Description of "number_of_camera_references" =====
  
 === Name === === Name ===
Line 6: Line 6:
  
 === 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 ===
  
-  create function number_of_camera_references(integer) returns bigint +<code sql> 
-  as 'select count(photo_tech.identifier) +create function number_of_camera_references(integer) returns bigint 
-        from photo_tech, camera +as 'select count(photo_tech.identifier) 
-       where photo_tech.camera=camera.identifier +      from photo_tech, camera 
-         and camera.identifier = $1' language 'sql';+     where photo_tech.camera=camera.identifier 
 +       and camera.identifier = $1' language 'sql'; 
 +</code>
  
 === Related tables === === Related tables ===
  
-=== Related indexes === +  * [[camera sql table|camera]] 
- +  * [[photo_tech sql table|photo_tech]]
-=== Related functions === +
- +
-=== Related views ===+
  
 === History === === History ===
Line 39: Line 44:
 = Version 2.5 = = Version 2.5 =
  
-  create function number_of_camera_references(integer) returns bigint +<code sql> 
-  as 'select count(photo_tech.identifier) +create function number_of_camera_references(integer) returns bigint 
-        from photo_tech, camera +as 'select count(photo_tech.identifier) 
-       where photo_tech.camera=camera.identifier +      from photo_tech, camera 
-         and camera.identifier = $1' language 'sql';+     where photo_tech.camera=camera.identifier 
 +       and camera.identifier = $1' language 'sql'; 
 +</code>
  
podoc/number_of_camera_references_sql_function.1176394900.txt.gz · Last modified: 2007/04/12 16:21 by Luud