photo_shop_transaction_references
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.
To retrieve the number of shop transactions for a particular photo item.
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';
Version 2.29
Still in use
= 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';