VbzCart/docs/queries/qryTitles Imageless: Difference between revisions
Jump to navigation
Jump to search
imported>Woozle (Created page with "==About== * '''Requires''': {{vbzcart/query|qryTitles_Item_info}}, {{vbzcart/query|qryImgs_byTitle}} * '''Note''': this is a rather slow query (10-50 seconds) * '''History''': **...") |
m (Woozle moved page VbzCart/VbzCart/queries/qryTitles Imageless to VbzCart/docs/queries/qryTitles Imageless without leaving a redirect: part 3/5) |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
==About== | ==About== | ||
* '''Requires''': {{vbzcart/query|qryTitles_Item_info}}, {{vbzcart/query|qryImgs_byTitle}} | * '''Requires''': {{vbzcart/query|qryTitles_Item_info}}, {{vbzcart|table|cat_images}} <s>{{vbzcart/query|qryImgs_byTitle}}</s> | ||
* ''' | * '''Used by''': VbzAdmin | ||
* '''History''': | * '''History''': | ||
** '''2012-01-10''' created for listing of Imageless Titles | ** '''2012-01-10''' created for listing of Imageless Titles | ||
** '''2012-03-11''' simpler query returns the same results in under 8 seconds (previous version took 10-50 seconds) | |||
==SQL== | ==SQL== | ||
<section begin=sql /><mysql>CREATE OR REPLACE VIEW qryTitles_Imageless AS | <section begin=sql /><mysql>CREATE OR REPLACE VIEW qryTitles_Imageless AS | ||
SELECT | |||
t.* | |||
FROM qryTitles_Item_info AS t | |||
LEFT JOIN cat_images AS i | |||
ON t.ID=i.ID_Title | |||
WHERE (i.ID IS NULL) AND (t.cntForSale > 0);</mysql><section end=sql /> | |||
===old=== | |||
<mysql>CREATE OR REPLACE VIEW qryTitles_Imageless AS | |||
SELECT | SELECT | ||
t.* | t.* | ||
Line 11: | Line 20: | ||
LEFT JOIN `qryImgs_byTitle` AS i | LEFT JOIN `qryImgs_byTitle` AS i | ||
ON t.ID=i.ID_Title | ON t.ID=i.ID_Title | ||
WHERE ((i.ID_Title IS NULL) OR (i.cntActive=0)) AND (t.cntForSale > 0);</mysql | WHERE ((i.ID_Title IS NULL) OR (i.cntActive=0)) AND (t.cntForSale > 0);</mysql> |
Latest revision as of 01:56, 25 February 2024
About
- Requires: Template:Vbzcart/query, Template:Vbzcart
Template:Vbzcart/query - Used by: VbzAdmin
- History:
- 2012-01-10 created for listing of Imageless Titles
- 2012-03-11 simpler query returns the same results in under 8 seconds (previous version took 10-50 seconds)
SQL
<section begin=sql /><mysql>CREATE OR REPLACE VIEW qryTitles_Imageless AS SELECT
t.*
FROM qryTitles_Item_info AS t LEFT JOIN cat_images AS i ON t.ID=i.ID_Title WHERE (i.ID IS NULL) AND (t.cntForSale > 0);</mysql><section end=sql />
old
<mysql>CREATE OR REPLACE VIEW qryTitles_Imageless AS SELECT
t.*
FROM `qryTitles_Item_info` AS t LEFT JOIN `qryImgs_byTitle` AS i ON t.ID=i.ID_Title WHERE ((i.ID_Title IS NULL) OR (i.cntActive=0)) AND (t.cntForSale > 0);</mysql>