
#1
Posted 09 December 2020 - 02:48 PM
#2
Posted 04 August 2021 - 11:01 PM
SELECT c.email FROM ps_customer c INNER JOIN ps_orders o on c.id_customer = o.id_customer INNER JOIN ps_order_detail od on o.id_order = od.id_order INNER JOIN ps_category_product pc ON pc.id_product = od.product_id WHERE pc.id_category = 2 GROUP BY c.email
wskazujemy id kategorii w klauzuli WHERE, w przykładzie jest "2".
#3
Posted 26 April 2022 - 09:50 AM
Witam
Proszę o podpowiedź jak do tego zapytania dodać numer telefonu klienta.
SELECT
c.`id_customer` AS `id_customer`, `id_gender`, `firstname`, `lastname`, c.`email` AS `email`, `birthday`, `date_add`, c.`active` AS `active`
, c.*, a.id_group
FROM `rk_customer_group` a
LEFT JOIN `rk_customer` c ON (a.`id_customer` = c.`id_customer`)
WHERE 1 AND a.`id_group` = 4 AND c.`deleted` != 1 AND c.id_shop IN (1)
ORDER BY `id_group` ASC
2 user(s) are reading this topic
0 members, 2 guests, 0 anonymous users