Difference between revisions of "VbzCart/tables/ title ittyps"

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
Jump to navigation Jump to search
(New page: ==About== * '''Purpose''': list of available titles for each item type * '''History''': ** '''2007-09-20''' Added cntInStock field because we need to be able to figure out how many line it...)
 
(correction)
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
==About==
 
==About==
* '''Purpose''': list of available titles for each item type
+
* '''Returns''': list of available titles for each item type
 +
** This table provides some of the same information as {{vbzcart/query|qryTitles_ItTyps_ItTyps}}, but consolidated by ItTyp
 +
* '''Sources''': {{vbzcart|proc|Upd_TitleIttyps_fr_CatItems_Titles}}, {{vbzcart|proc|Upd_TitleIttyps_fr_CatIttyps}}, {{vbzcart|proc|Upd_TitleIttyps_fr_Titles}}
 +
* '''Used by''': {{vbzcart|proc|Upd_Titles_fr_TitleIttyps}}, {{vbzcart|proc|Upd_DeptIttyps_fr_TitleIttyps}}, {{vbzcart|proc|Upd_SupplierIttyps}}
 
* '''History''':
 
* '''History''':
 
** '''2007-09-20''' Added cntInStock field because we need to be able to figure out how many line items are available but ''not'' in stock (cntForSale-cntInStock)
 
** '''2007-09-20''' Added cntInStock field because we need to be able to figure out how many line items are available but ''not'' in stock (cntForSale-cntInStock)
 +
** '''2010-11-13''' Added 2 fields to help with availability status display: '''cntLines''', '''cntCurrent'''
 
==SQL==
 
==SQL==
 
<section begin=sql /><mysql>DROP TABLE IF EXISTS `_title_ittyps`;
 
<section begin=sql /><mysql>DROP TABLE IF EXISTS `_title_ittyps`;
Line 13: Line 17:
 
   `ItTypNamePlr` varchar(63) COMMENT "cat_ittyps.NamePlr",
 
   `ItTypNamePlr` varchar(63) COMMENT "cat_ittyps.NamePlr",
 
   `ItTypSort` varchar(31) COMMENT "cat_ittyps.Sort",
 
   `ItTypSort` varchar(31) COMMENT "cat_ittyps.Sort",
 +
  `cntLines` int COMMENT "# of different items for this title+type",
 +
  `cntCurrent` int COMMENT "# of different items whose item data is current, for this title+type",
 +
  `cntInPrint` int COMMENT "# of different items (for type) in print for this title",
 
   `cntForSale` int COMMENT "# of different items available for type (either in stock or in print)",
 
   `cntForSale` int COMMENT "# of different items available for type (either in stock or in print)",
  `cntInPrint` int COMMENT "# of different items (for type) in print for this title",
 
 
   `cntInStock` int COMMENT "# of different items (for type) which are for sale due to at least being in stock",
 
   `cntInStock` int COMMENT "# of different items (for type) which are for sale due to at least being in stock",
 
   `qtyInStock` int COMMENT "-1 = some in stock, but don't know how many",
 
   `qtyInStock` int COMMENT "-1 = some in stock, but don't know how many",
Line 23: Line 29:
 
   `CatDir` varchar(63) DEFAULT NULL,
 
   `CatDir` varchar(63) DEFAULT NULL,
 
   PRIMARY KEY (`ID_Title`,`ID_ItTyp`,`ID_Dept`)
 
   PRIMARY KEY (`ID_Title`,`ID_ItTyp`,`ID_Dept`)
  ) ENGINE=MyISAM DEFAULT CHARSET=latin1;</mysql>
+
  ) ENGINE=MyISAM;</mysql>
 
<section end=sql />
 
<section end=sql />

Latest revision as of 18:34, 24 January 2011

About

  • Returns: list of available titles for each item type
    • This table provides some of the same information as
  1. REDIRECT Template:l/vc/query, but consolidated by ItTyp

SQL

<mysql>DROP TABLE IF EXISTS `_title_ittyps`;

CREATE TABLE `_title_ittyps` (
  `ID_Title` int unsigned NOT NULL,
  `ID_ItTyp` int unsigned NOT NULL,
  `ID_Dept` int unsigned NOT NULL,
  `TitleName` varchar(127),
  `ItTypNameSng` varchar(63) COMMENT "cat_ittyps.NameSng",
  `ItTypNamePlr` varchar(63) COMMENT "cat_ittyps.NamePlr",
  `ItTypSort` varchar(31) COMMENT "cat_ittyps.Sort",
  `cntLines` int COMMENT "# of different items for this title+type",
  `cntCurrent` int COMMENT "# of different items whose item data is current, for this title+type",
  `cntInPrint` int COMMENT "# of different items (for type) in print for this title",
  `cntForSale` int COMMENT "# of different items available for type (either in stock or in print)",
  `cntInStock` int COMMENT "# of different items (for type) which are for sale due to at least being in stock",
  `qtyInStock` int COMMENT "-1 = some in stock, but don't know how many",
  `currMinPrice` DECIMAL(9,2) DEFAULT NULL COMMENT 'minimum price for this item type',
  `currMaxPrice` DECIMAL(9,2) DEFAULT NULL COMMENT 'maximum price for this item type',
  `CatNum` varchar(63) DEFAULT NULL,
  `CatWeb` varchar(63) DEFAULT NULL,
  `CatDir` varchar(63) DEFAULT NULL,
  PRIMARY KEY (`ID_Title`,`ID_ItTyp`,`ID_Dept`)
) ENGINE=MyISAM;</mysql>