VbzCart/queries/qryCbx Items opt

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
< VbzCart‎ | queries
Revision as of 19:10, 30 November 2008 by Woozle (talk | contribs) (moved from single-page listing)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Details

SQL

<mysql>CREATE OR REPLACE VIEW qryCbx_Items_opt AS SELECT

 i.ID,
 CAST(
   CONCAT(
     if(i.isPulled,
       '*P* ',
       
     ),
     if(i.ID_ItOpt IS NULL,
       CONCAT('#',i.ID,' (no opt)')
       ,io.CatKey),
     if(i.isForSale,,' *n/a*')
   ) AS CHAR
 ) AS Descr,
 i.CatNum

FROM cat_items AS i LEFT JOIN cat_ioptns AS io ON i.ID_ItOpt=io.ID;</mysql>