> I won't say you need to go back to high school, but maybe you need to > review how SQL works. You have no criterion for joining your two
At least my knowledge of SQL needs an update. Although there are criteria for joining the two tables I realize that the way I specified them is wrong. > tables, so your result set will contain every row from bron that has > media = 'Book' combined with absolutely every row from topic. In > addition, you'll have every row from topic that has a topic_code of > '5.1' combined with whatever rows of bron have a matching naam_bron. That's exactly what I get. > > It's hard to know, but I suspect you want something like Good guess. > > SELECT naam_bron FROM bron, topic > WHERE topic.naam_bron = bron.naam_bron > AND ( bron.media = 'Book' OR topic.topic_code = '5.1' ); > > or, written another way, > > SELECT naam_bron > FROM bron INNER JOIN topic USING (naam_bron) > WHERE bron.media = 'Book' OR topic.topic_code = '5.1'; These things work fine. Thanks. Peter --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php