VbzCart/docs/queries/ cat pages: Difference between revisions
Jump to navigation
Jump to search
imported>Woozle (New page: ==About== * '''Purpose''': catalog index, for translating URLs to page-display requests; {{vbzcart|proc|Upd_CatPages}} caches the output in a table * '''Requires''': {{vbzcart|table|cat_su...) |
m (Woozle moved page VbzCart/VbzCart/queries/ cat pages to VbzCart/docs/queries/ cat pages without leaving a redirect: part 2) |
(No difference)
|
Latest revision as of 01:55, 25 February 2024
About
- Purpose: catalog index, for translating URLs to page-display requests; Template:Vbzcart caches the output in a table
- Requires: Template:Vbzcart, Template:Vbzcart, Template:Vbzcart/query, Template:Vbzcart/query
SQL
<section begin=sql /><mysql>CREATE OR REPLACE VIEW _cat_pages AS
SELECT CONCAT_WS('-','S',ID) AS AB, LOWER(CatKey) AS Path, ID, 'S' AS Type FROM cat_supp UNION SELECT CONCAT_WS('-','D',ID) AS AB, LOWER(CatWeb_Dept) AS Path, ID, 'D' AS Type FROM qryCat_Depts UNION SELECT CONCAT_WS('-','T',ID) AS AB, REPLACE(LOWER(CatWeb),'-','/') AS Path, ID, 'T' AS Type FROM qryCat_Titles UNION /* image pages (every size except thumbnail and small) */ SELECT CONCAT_WS('-','I',i.ID) AS AB, LOWER(CONCAT_WS('/',REPLACE(t.CatWeb,'-','/'),AttrFldr,i.Ab_Size)) AS Path, i.ID, 'I' AS Type FROM cat_images AS i LEFT JOIN qryCat_Titles AS t ON i.ID_Title=t.ID WHERE (i.isActive) AND (i.Ab_Size NOT IN ('th','sm'));</mysql>
<section end=sql />