u
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user