Sorry to repost a message but it looks like the first one didn't
actually get posted.

In my database, I have a table of event/activity listings (in a table
called "listing" for example) that are displayed on a web site. Each
listing may have multiple attributes associated with it for things like
the time of day when the activity takes place - for example, "morning",
"afternoon", "evening" or any combination of the three. Since each
listing may have more than one time of day, the possible times of day
are stored in a table and a third table contains unique pairs of
foreign keys connect the listing table and the time of day table.

But now how would I write a query to select rows from "listing" that
have certain times of day associated with them? I tried a select
statement similar to "SELECT * FROM listing, connectingTable WHERE
connectingTable.listingId=listing.id AND
connectingTable.keyFromTimeOfDayTable IN ('1','3')" but since this does
a join that duplicates each posting row for each time of day associated
with it, I get the same posting back multiple times. If a post has
three times associated with it, I get three more or less identical
copies of that row back in the results. I know that's what the query
is supposed to do but that's not what I am after. I'm certain this is
a common task but can't remember how to go about it. Any ideas?

-Brandon