Hey All,

I want to accomplish this with a single statement, but I don't know much about joins...

SELECT COUNT(*) AS val1 FROM topics WHERE fid = 2
SELECT COUNT(*) AS val2 FROM posts WHERE fid = 2

Return value is val1 + val2

I tried:

SELECT COUNT(*) FROM topics LEFT JOIN posts ON topics.fid = posts.fid WHERE topics.FID = 2

...but it returned 6 instead of 5

Any Ideas?