VbzCart/docs/queries/qrySub Carts info items: Difference between revisions

From Woozle Writes Code
< VbzCart‎ | docs‎ | queries
Jump to navigation Jump to search
imported>Woozle
(Created page with '==Details== * '''Requires''': {{vbzcart/table|shop_cart_line}} * '''History''': ** '''2009-09-08''' Created for Special:VbzAdmin ==SQL== <section begin=sql /><mysql>CREATE OR REP…')
 
imported>Woozle
(corrected table name in SQL; changed count field name for disambiguation in combined results)
Line 4: Line 4:
** '''2009-09-08''' Created for Special:VbzAdmin
** '''2009-09-08''' Created for Special:VbzAdmin
==SQL==
==SQL==
<section begin=sql /><mysql>CREATE OR REPLACE VIEW qrySub_Carts_info_lines AS
<section begin=sql /><mysql>CREATE OR REPLACE VIEW qrySub_Carts_info_items AS
SELECT
SELECT
   ID_Cart, COUNT(ID_Cart) AS DataCount
   ID_Cart, COUNT(ID_Cart) AS ItemCount
FROM shop_cart_line
FROM shop_cart_line
GROUP BY ID_Cart;</mysql>
GROUP BY ID_Cart;</mysql>
<section end=sql />
<section end=sql />

Revision as of 01:30, 9 September 2009

Details

SQL

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

 ID_Cart, COUNT(ID_Cart) AS ItemCount

FROM shop_cart_line GROUP BY ID_Cart;</mysql> <section end=sql />