VbzCart/docs/queries/qryCtg Items updates: Difference between revisions
Jump to navigation
Jump to search
imported>Woozle (moved from single-page listing) |
m (Woozle moved page VbzCart/VbzCart/queries/qryCtg Items updates to VbzCart/docs/queries/qryCtg Items updates without leaving a redirect: part 2) |
(No difference)
| |
Latest revision as of 01:55, 25 February 2024
Details
- Requires: ctg_titles, ctg_groups, qryCtg_Sources_active, ctg_items, cat_ioptns
SQL
<section begin=sql /><mysql>CREATE OR REPLACE VIEW qryCtg_Items_updates AS
SELECT
NULLIF(CONCAT_WS('/',g.Code,gt.GroupCode,o.CatKey),) AS CatSfx,
gt.ID_Title,
g.ID AS ID_TGroup,
gt.ID AS ID_TGTitle,
gi.ID AS ID_TGItem,
gt.ID_Source AS ID_TGSource,
gi.ID_ItTyp, gi.ID_ItOpt
FROM
(
(
(
ctg_titles AS gt LEFT JOIN ctg_groups AS g ON g.ID=gt.ID_Group
) LEFT JOIN qryCtg_Sources_active AS c ON gt.ID_Source=c.ID
) LEFT JOIN ctg_items AS gi ON gi.ID_Group=g.ID
) LEFT JOIN cat_ioptns AS o ON gi.ID_ItOpt=o.ID
WHERE
(c.ID IS NOT NULL)
AND g.isActive
AND gt.isActive
AND ((gt.WhenDiscont IS NULL) OR (gt.WhenDiscont>NOW()))
AND gi.isActive;</mysql>
<section end=sql />