User Tools

Site Tools


podoc:number_of_support_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_support_references_sql_function [2007/04/13 07:20] Luudpodoc:number_of_support_references_sql_function [2007/04/23 14:32] (current) Luud
Line 6: Line 6:
  
 === Description === === Description ===
 +
 +Counts the number of references to a particular support.
 +
 +Tentative (is this correct?): this represents the number of photos in the database captured using the specified support.
  
 === Purpose === === Purpose ===
 +
 +To retrieve the number of references to a particular support.
  
 === Schema === === Schema ===
  
-  create function number_of_support_references(integer) returns bigint +<code sql> 
-  as 'select count(photo_tech.identifier) +create function number_of_support_references(integer) returns bigint 
-        from photo_tech, support +as 'select count(photo_tech.identifier) 
-       where photo_tech.support=support.identifier +      from photo_tech, support 
-         and support.identifier = $1' language 'sql';+     where photo_tech.support=support.identifier 
 +       and support.identifier = $1' language 'sql'; 
 +</code>
  
 === Related tables === === Related tables ===
  
-=== Related indexes === +  * [[photo_tech sql table|photo_tech]] 
- +  * [[support sql table|support]]
-=== Related functions === +
- +
-=== Related views ===+
  
 === History === === History ===
Line 39: Line 44:
 = Version 2.5 = = Version 2.5 =
  
-  create function number_of_support_references(integer) returns bigint +<code sql> 
-  as 'select count(photo_tech.identifier) +create function number_of_support_references(integer) returns bigint 
-        from photo_tech, support +as 'select count(photo_tech.identifier) 
-       where photo_tech.support=support.identifier +      from photo_tech, support 
-         and support.identifier = $1' language 'sql';+     where photo_tech.support=support.identifier 
 +       and support.identifier = $1' language 'sql'; 
 +</code>
  
podoc/number_of_support_references_sql_function.1176448811.txt.gz · Last modified: 2007/04/13 07:20 by Luud