SELECT SQL_CALC_FOUND_ROWS p.product_id, p.main_image, p.main_list_comment, p.comment2, p.update_date, p.sub_title6, MAX(price02), MAX(price03), MAX(stock), pc.point_rate, p.sales_datetime, p.sales_end_datetime, IF(p.tweet=p.tweet, 1, 0) AS tweet, p.name, p.movie_s, GROUP_CONCAT(cc.name separator ' ') AS classlist, GROUP_CONCAT(pc.stock separator ' ') AS stocklist
FROM (
SELECT product_id, category_id
FROM dtb_product_categories
WHERE category_id =17
)AS pcat
LEFT JOIN dtb_products AS p ON p.product_id = pcat.product_id
LEFT JOIN dtb_products_class AS pc ON p.product_id = pc.product_id
LEFT JOIN dtb_classcategory AS cc ON pc.classcategory_id1 = cc.classcategory_id
WHERE p.product_id IS NOT NULL
AND p.del_flg !=1
AND p.status =1
AND (p.sales_end_datetime IS NULL OR p.sales_end_datetime >= '2024-04-24 23:17:04')
AND p.product_id IN (SELECT product_id FROM dtb_product_categories WHERE category_id = 447)
AND pc.del_flg = 0
GROUP BY p.product_id
ORDER BY p.update_date DESC
LIMIT 0, 25
61271 Zephyren 2022 NEW YEAR BAG
17231 ZEPHYREN (ゼファレン) B.B.CAP -BEYOND- - BLACK/WHITE
17236 ZEPHYREN (ゼファレン) B.B.CAP -BEYOND- BLACK/GRAY
17257 ZEPHYREN (ゼファレン) B.B.CAP -VISIONARY- BLACK/WHITE
19657 ZEPHYREN (ゼファレン) B.B.CAP -VISIONARY - BLACK/GRAY
62386 Zephyren(ゼファレン) MESH CAP -Victoria- BLACK / RED
45602 Zephyren(ゼファレン)LO CAP - PROVE - BLACK
57610 【予約商品】Zephyren(ゼファレン) B.B CAP -BEYOND- BLACK / WHITE
57616 【予約商品】Zephyren(ゼファレン) B.B CAP -BEYOND- BLACK / GRAY
57623 【予約商品】Zephyren(ゼファレン) LO CAP -PROVE- BLACK
57102 Zephyren 2021 NEW YEAR BAG
55778 【バンドリ!×ゲキクロ 第2弾復刻】ZEPHYREN×湊友希那コラボ 限定 キャップ
45600 Zephyren(ゼファレン)LO CAP - PROVE - WHITE
38450 Zephyren (ゼファレン) LONG STRAP LO CAP -ENGRAVE- WHITE
38451 Zephyren (ゼファレン) LONG STRAP LO CAP -ENGRAVE- BLACK
54490 【バンドリ!×ゲキクロ第1弾復刻】ZEPHYREN×湊友希那コラボ 限定 キャップ
15247 ZEPHYREN (ゼファレン) SNAPBACK CAP -BEYOND- BLK/BLK
15250 ZEPHYREN (ゼファレン) SNAPBACK CAP -Thorns fame- BLK
15255 ZEPHYREN (ゼファレン) MESH CAP -Thorns fame- BLK
17226 ZEPHYREN (ゼファレン) MESH CAP -BEYOND- BLACK/WHITE
17227 ZEPHYREN (ゼファレン) MESH CAP -BEYOND- BLACK/BURGUNDY
17228 ZEPHYREN (ゼファレン) MESH CAP -BEYOND- BLACK/BLACK
17230 Zephyren MESH CAP -BEYOND- - BURGUNDY
17232 ZEPHYREN (ゼファレン) B.B.CAP -BEYOND- BLACK/BURGUNDY
17233 ZEPHYREN (ゼファレン) B.B.CAP -BEYOND- BURGUNDY