VbzCart/docs/queries/qryCtg Titles active: Difference between revisions

From Woozle Writes Code
< VbzCart‎ | docs‎ | queries
Jump to navigation Jump to search
imported>Woozle
(moved from single-page listing)
 
imported>Woozle
(added to main server database)
Line 1: Line 1:
==Details==
==Details==
* '''Purpose''': Brings up ''only'' [[../../tables/ctg_titles|ctg_titles]] records which are active, making it impossible for an inactive catalog to make an active title look inactive.
* '''Purpose''': Brings up ''only'' {{vbzcart|table|ctg_titles}} records which are active, making it impossible for an inactive catalog to make an active title look inactive.
* '''Requires''': [[../../tables/ctg_titles|ctg_titles]]
* '''Requires''': {{vbzcart|table|ctg_titles}}
* '''History''':
** '''2009-05-03''' Added to main server database (no change in design)
==SQL==
==SQL==
<section begin=sql /><mysql>CREATE OR REPLACE VIEW qryCtg_Titles_active AS
<section begin=sql /><mysql>CREATE OR REPLACE VIEW qryCtg_Titles_active AS

Revision as of 21:39, 3 May 2009

Details

  • Purpose: Brings up only Template:Vbzcart records which are active, making it impossible for an inactive catalog to make an active title look inactive.
  • Requires: Template:Vbzcart
  • History:
    • 2009-05-03 Added to main server database (no change in design)

SQL

<section begin=sql /><mysql>CREATE OR REPLACE VIEW qryCtg_Titles_active AS

 SELECT
   *
 FROM ctg_titles AS tgt
 WHERE 
   tgt.isActive
   AND
   ( ( tgt.WhenDiscont Is Null
      ) Or (
       tgt.WhenDiscont>Now()
      )
    );</mysql>

<section end=sql />