I have two tables 'projects' and 'overground' - when I run this query I get the ID from the overground value (40), not the value it holds which should be 'Forest Hill'.
SELECT *
FROM projects
JOIN overground ON projects.overground_id=overground.overground_id
WHERE name = 'The Horniman Museum & Gardens '
I'm confused about my query, I need all rows from 'projects' (in this case from the "The Horniman Museum & Gardens") and the value from 'overground_id' (='forest hill).
I think it's something to do with the WHERE clause, but not sure.
Why not try something like this instead:
Personally, I just prefer avoiding explicit joins when possible just for simplicity but to each their own.