so 10000 has matching information in the meta_suites table and 10050 and 10100 has not yet meta information

samanime
—
2011-03-15T18:39:17Z —
#6

Ah, I see.

So, if you ignore the second join, you get this:10000, 44, 000_10000_suite_algemeen

Then, because of the test ID, with the third join this winds up getting duplicated, so you get the results you get, where it joins the test ID to the other.

Changing the second table to be a RIGHT JOIN should do the trick, though you'll likely get more rows then you want. If you add something like "GROUP BY ms.id', you can get rid of the duplicate ms.id rows (assuming ms.id is unique... if it's not you may lose results you want).

DaanOpstaan
—
2011-03-15T19:01:56Z —
#7

Unfortunately, nothing works. I tried left, right and inner joins with group by and having