INNER JOIN not working with MYSQL database


#1

I have two tables t1 and t2. t1 contains all my customer info:name, address, email, etc... t2 is my email optin list. I used INNER JOIN to combine the tables where the email addresses are the same. However, I can't get it to work for some reason. Here is my SQL that I have tried:

SELECT t2.email, t1.name, t1.address FROM t1 INNER JOIN t2 ON t1.email = t2.email;

It returns 0 rows, but I have looked through the data and I see matching email address in both tables, so I am not sure why it isn't working. Any idea?


#2

Update: After looking into this further I noticed that I could search and find email address from t1 but if I searched for the same email address in t2 I wouldn't get any results.

This was my query:
SELECT * FROM t1
WHERE email = 'fake@gmail.com';
return results 1 rows.

Same query in t2:
SELECT * FROM t2
WHERE email = 'fake@gmail.com';
returned results 0 rows.

the email is in both tables, but t2 returns 0 results and t1 returns 1 like it should, any ideas?