VbzCart/docs/queries/qryCbx Items opt

From Woozle Writes Code
< VbzCart‎ | docs‎ | queries
Revision as of 01:55, 25 February 2024 by Woozle (talk | contribs) (Woozle moved page VbzCart/VbzCart/queries/qryCbx Items opt to VbzCart/docs/queries/qryCbx Items opt without leaving a redirect: part 2)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Details

SQL

<section begin=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> <section end=sql />