u
This commit is contained in:
@@ -24,6 +24,11 @@ LEFT JOIN pic ON pic.id = (
|
||||
SELECT ap.pic_id FROM articlepic ap
|
||||
WHERE ap.article_id = a.id ORDER BY ap.sort, ap.id LIMIT 1
|
||||
)
|
||||
LEFT JOIN brand b ON b.id = a.brand_id
|
||||
LEFT JOIN pic brand_pic ON brand_pic.id = (
|
||||
SELECT bp.pic_id FROM brandpic bp
|
||||
WHERE bp.brand_id = b.id ORDER BY bp.sort, bp.id LIMIT 1
|
||||
)
|
||||
LEFT JOIN article father ON father.id = a.fatherarticle_id
|
||||
`;
|
||||
|
||||
@@ -119,7 +124,9 @@ SELECT auth.*,
|
||||
'unitamount', a.unitamount, 'weight', a.weight,
|
||||
'unitSi', u.si, 'unitBasesi', u.basesi,
|
||||
'unitBasesifactor', u.basesifactor, 'unitSymbol', ut.symbol,
|
||||
'unitName', ut.name, 'brandName', b.name,
|
||||
'unitName', ut.name,
|
||||
'brandId', b.id, 'brandName', b.name,
|
||||
'brandFullHash', bp.hash,
|
||||
'brandThumbW', bp.thumbw, 'brandThumbH', bp.thumbh,
|
||||
'brandThumbHash', bp.thumbhash,
|
||||
'optionsCount', (SELECT COUNT(*) FROM optionslistarticle WHERE optionslist_id = a.optionslist_id),
|
||||
|
||||
Reference in New Issue
Block a user