This commit is contained in:
seb
2026-09-30 21:12:32 +02:00
parent 69d172d49b
commit ed91ccbaee
3 changed files with 35 additions and 54 deletions

View File

@@ -139,10 +139,10 @@ SELECT
(
SELECT
ap.sort,
p.hash,
p.thumbhash,
p.thumbw,
p.thumbh
p.hash AS fullHash,
p.thumbhash AS thumbHash,
p.thumbw AS thumbW,
p.thumbh AS thumbH
FROM articlepic ap
INNER JOIN pic p ON p.id = ap.pic_id
WHERE ap.article_id = a.id

View File

@@ -17,8 +17,8 @@ SELECT
t.rate AS priceTaxRate, a.id AS a_id, a.sku AS a_sku,
at.name AS a_name, at.slug AS a_slug,
(SELECT COALESCE(json_group_array(json_object(
'sort', sort, 'hash', hash, 'thumbhash', thumbhash,
'thumbw', thumbw, 'thumbh', thumbh
'sort', sort, 'fullHash', hash, 'thumbHash', thumbhash,
'thumbW', thumbw, 'thumbH', thumbh
)), '[]') FROM (
SELECT ap.sort, pic.hash, pic.thumbhash, pic.thumbw, pic.thumbh
FROM articlepic ap INNER JOIN pic ON pic.id = ap.pic_id