In MySQL:
If we have two tables:
comments key | value ================= 1 | foo 2 | bar 3 | foobar 4 | barfoo
I would use "INNER JOIN" in the following way:
SELECT comments.key, comments.value FROM comments INNER JOIN meta ON comments.key=meta.comment_key WHERE meta.value = 1;
Cheers! ;-)