I have a site where users can share content. 

I have a table called "Posts" with two columns; `"Type"` and `"Media"`. The `"Type"` column identifies what kind of post it is. i.e. if it contains any photos or if it's just a plain post. If it contains a photo the `"Type"` column will have the value `"b"` and if it's a blank post with no photo it will have the value `"a"`. If the value of `"Type"` is equal to `"b"` the `"Media"` column will have an ID integer as the value identifies the photo attached to the post.

In a separate table, `"Photos"` each photo that is uploaded is given a unique ID. This unique ID is put into the value of `"Media`" in the `"Posts"` table.

I want to do an `INNER JOIN` in my `SQL` syntax **ONLY** if the value of `"Type"` is equal to `"b"`.

Can anyone help point me in the correct direction?