I have 2 below tables:
tblCustomers:
id customerName
1 John
2 Philip
3 Steve
tblOredrs:
id customerId ordId payment
1 1 100 True
2 1 101 True
3 1 102 False
4 2 101 True
5 2 102 True
6 2 103 False
7 3 101 True
my condition is:
where (orderId = 101 and orderId = 102)
I want to see all payment true order, for the customers that have orders (101 & 102). but orderids may be more than 2, it must be dynamic.
i must get:
john 100
john 101
Philip 101
Philip 102