Is there some problem I am overlooking for the following SELECT statement? When I run the script using the AND in the WHERE clause, I get my results quickly. When I run the exact same script replacing the AND for an OR in the WHERE clause, it bogs down and does nothing. Here is my Select Statement using the OR:
select
nchamps_rec.type AS national,
conferences.longname AS conference
from nchamps_rec, cchamps, conferences
where (nchamps_rec.team = '$team'
and nchamps_rec.year = $year1)
OR (nchamps_rec.team = cchamps.teamid
and nchamps_rec.year = cchamps.year
and cchamps.confid = conferences.conid)
");