VbzCart/docs/queries/qryTitleTopic Topics: Difference between revisions

From Woozle Writes Code
< VbzCart‎ | docs‎ | queries
Jump to navigation Jump to search
imported>Woozle
(Created page with "==About== * '''Returns''': titles x topics with complete Topic data * '''Used by''': Title pages * '''Requires''': {{vbzcart|table|brs_titles_x_topics}}, {{vbzcart|table|brs_topi...")
 
imported>Woozle
(table names changed)
Line 5: Line 5:
* '''History''':
* '''History''':
** '''2011-01-24''' created for Topic listing on Title pages
** '''2011-01-24''' created for Topic listing on Title pages
** '''2011-09-28''' renamed brs_* to cat_* (singular) for consistency
==SQL==
==SQL==
<section begin=sql /><mysql>CREATE OR REPLACE VIEW qryTitleTopic_Topics AS
<section begin=sql /><mysql>CREATE OR REPLACE VIEW qryTitleTopic_Topics AS
   SELECT tt.ID_Title, t.*
   SELECT tt.ID_Title, t.*
   FROM brs_titles_x_topics AS tt
   FROM cat_title_x_topic AS tt
   LEFT JOIN brs_topics AS t
   LEFT JOIN cat_topic AS t
   ON tt.ID_Topic=t.ID;</mysql>
   ON tt.ID_Topic=t.ID;</mysql>
<section end=sql />
<section end=sql />

Revision as of 23:21, 28 September 2011

About

  • Returns: titles x topics with complete Topic data
  • Used by: Title pages
  • Requires: Template:Vbzcart, Template:Vbzcart
  • History:
    • 2011-01-24 created for Topic listing on Title pages
    • 2011-09-28 renamed brs_* to cat_* (singular) for consistency

SQL

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

 SELECT tt.ID_Title, t.*
 FROM cat_title_x_topic AS tt
 LEFT JOIN cat_topic AS t
 ON tt.ID_Topic=t.ID;</mysql>

<section end=sql />