I would like to request help from someone who is having good experience with INNER JOIN
..Here i have two tables
Table 1
===========
id | name
===========
1 | john
2 | mark
Table 2
======================================
id | customer_id | like_to_eat
======================================
1 | 1 | cake
2 | 2 | cake
3 | 1 | pudding
4 | 1 | chocolate
I wanted query to find out which customers would like to eat "cake"
I have done this
SELECT *
FROM table1
INNER JOIN table2
ON table1.id = table2.customer_id
WHERE table2.like_to_eat ='cake'
but then again i am not getting the correct $row['id']
Any help appreciated.