Difference between revisions of "VbzCart/queries/qryTitles ItTyps ItTyps"
Jump to navigation
Jump to search
(changing field names for compatibility with cached table) |
(corrections) |
||
Line 1: | Line 1: | ||
==About== | ==About== | ||
* '''Returns''': list of available titles for each item type | * '''Returns''': list of available titles for each item type | ||
− | ** This query | + | ** This query provides some of the same information as {{vbzcart|table|_title_ittyps}}, but (a) broken down by Item and (b) using live data. |
− | |||
* '''Requires''': {{vbzcart/query|qryTitles_ItTyps_grpItems}}, {{vbzcart/table|cat_ittyps}} | * '''Requires''': {{vbzcart/query|qryTitles_ItTyps_grpItems}}, {{vbzcart/table|cat_ittyps}} | ||
− | * '''Used by''': can be used by catalog | + | * '''Used by''': can be used by catalog pages in place of cat_items to provide realtime data (instead of relying on some cached fields in cat_items), but this is very slow; currently no known uses. |
* '''History''': | * '''History''': | ||
** '''2009-04-13''' had to recreate because qryTitles_ItTyps_grpItems changed | ** '''2009-04-13''' had to recreate because qryTitles_ItTyps_grpItems changed | ||
− | ** '''2011-01-24''' For consistency with {{vbzcart|table|_title_ittyps}} | + | ** '''2011-01-24''' For consistency with {{vbzcart|table|_title_ittyps}}: |
*** '''ItTyp_Sort''' → '''ItTypSort''' | *** '''ItTyp_Sort''' → '''ItTypSort''' | ||
*** '''ItTyp_Sng''' → '''ItTypNameSng''' | *** '''ItTyp_Sng''' → '''ItTypNameSng''' |
Latest revision as of 19:20, 24 January 2011
About
- Returns: list of available titles for each item type
- This query provides some of the same information as _title_ittyps, but (a) broken down by Item and (b) using live data.
- Requires:
- REDIRECT Template:l/vc/query,
- REDIRECT Template:l/vc/table
- Used by: can be used by catalog pages in place of cat_items to provide realtime data (instead of relying on some cached fields in cat_items), but this is very slow; currently no known uses.
- History:
- 2009-04-13 had to recreate because qryTitles_ItTyps_grpItems changed
- 2011-01-24 For consistency with _title_ittyps:
- ItTyp_Sort → ItTypSort
- ItTyp_Sng → ItTypNameSng
- ItTyp_Plr → ItTypNamePlr
SQL
<mysql>CREATE OR REPLACE VIEW qryTitles_ItTyps_ItTyps AS SELECT
i.*, it.Sort AS ItTypSort, it.NameSng AS ItTypNameSng, IFNULL(it.NamePlr,it.NameSng) AS ItTypNamePlr
FROM qryTitles_ItTyps_grpItems AS i LEFT JOIN cat_ittyps AS it ON i.ID_ItTyp=it.ID;</mysql>