Forum Moderators: open

Message Too Old, No Replies

Tricky Join Query

         

Sarah Atkinson

7:22 pm on Apr 15, 2008 (gmt 0)

10+ Year Member



I'm trying to do a join on a table and it isn't going too well... It's been well over a year since I have had to do a join like this one and I can't rember how.

I have 2 Tables the both have the same column named id

I want to select all items however I only want the ones from table1 where another column Type=B
So I was thinking something like:

SELECT * FROM `table1` LEFT JOIN 'table2' USING (id) WHERE Type=B

I have most successfully found out this is wrong.. so any help with what is right?

Sarah Atkinson

7:26 pm on Apr 15, 2008 (gmt 0)

10+ Year Member



Never mind

I love it when the answer hits me when I hit Send