SQL INNER JOIN还是最佳选择? [关闭]

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.

Based on comments

SELECT table1.id as TheIDIReallyNeed
, table1.name
, table2.id
, table2.customer_id
, table2.like_to_eat
FROM table1 
INNER JOIN table2 
ON table1.id = table2.customer_id 
WHERE table2.like_to_eat ='cake'