One to Many relational search

wxdqz

New Member
I've got 2 tables, one for event header information, and the other for the dates and locations of the repeating events:
------------------
OPPS
------------------
id
title
sponsor

and

------------------
OPPDATES
------------------
id
startdate
enddate
location

I'm trying to do a search to display a list of the Opps sorted by ID with the related date information underneath a la:

Event 1:
How to not look that confused on the net.
Sponsored by AARP
Locations and Dates:
December 10-12, Los Angeles, CA
December 15-17, San Diego, CA


Event 2:
Why does it hurt when I pee?
Sponsored by the Mothers of Invention
Locations and Dates:
December 1-5, Palm Springs, CA
December 15-20, Hoboken, NJ

The only way I've got to do it now is by nesting queries (first finding all of the header information, looping through the found set, then having a sub-loop on the related information). Is there a one-query way to do this? If so, how do you reference the related event detail records?

TIA

brad
 
Back
Top