I have two tables ( visitedand purchased)
visited -> id,product,user_ip
purchased -> id,product,user_ip
which end up having the same value in the column user_ip. Example:
visited ->
1,product1,192.168.1.1
2,product2,192.168.1.1
3,product3,192.168.12.12
4,product4,192.168.12.12
purchased ->
1,product3,192.168.12.12
Can I choose all productsof the ones visitedthat I have user_ipwith purchased? In the above example, I will need to select id3andid4
Thank you in advance!
source
share