User Tools

Site Tools


podoc:photo_shop_transaction_references_sql_function

Database Function Description of "photo_shop_transaction_references"

Name

photo_shop_transaction_references

Description

Counts the number of shop transactions for a particular photo item.

Tentative (is this correct?): this represents the number of copies of a photo sold.

Purpose

To retrieve the number of shop transactions for a particular photo item.

Schema

CREATE FUNCTION photo_shop_transaction_references(INTEGER) RETURNS BIGINT
AS 'select count(shop_order.transaction)
      from photo_item, shop_order
     where photo_item.photo = $1
       and photo_item.identifier=shop_order.item' LANGUAGE 'sql';

History

Used first

Version 2.29

Used last

Still in use

Change history

= Version 2.29 =

CREATE FUNCTION photo_shop_transaction_references(INTEGER) RETURNS BIGINT
AS 'select count(shop_order.transaction)
      from photo_item, shop_order
     where photo_item.photo = $1
       and photo_item.identifier=shop_order.item' LANGUAGE 'sql';
podoc/photo_shop_transaction_references_sql_function.txt · Last modified: 2007/04/23 14:32 by Luud