I can be more specific. Query for all records with a join, perhaps WHERE
date is greater than or equal to last week sometime, so you'll still display
the race that just happened. Order by Date in your query so they show up
sequentially.

then group by race id in your output tags. that should do it for you.

-----Original Message-----
From: Nando [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 27, 2004 9:21 PM
To: CF-Talk
Subject: RE: I'm stumped.

I'd query for everything with a join, and then group at the output, if
that's enough info for you. I've done a lot of that with schedules, and it's
worked well for me.

-----Original Message-----
From: Jeff Fongemie [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 27, 2004 9:05 PM
To: CF-Talk
Subject: I'm stumped.

Hey everyone.

I'm stumped.

I need to be able to display a list of bicycle races, and under the ra
ce list the riders names and positions. I'd like to have two tables so
the admin adding the  data only needs to enter the race name and date
once, then adds the riders in a seperate table linked by a raceid.

Right now I've got two tables, one for the races, one for riders linke
d by common field raceid.

The above seems fine, but I'm having trouble querring and displaying r
esults. What I need should look like this:

RACE NAME, DATE, COUNTRY
ridername, place, team
ridername, place team
ridername, place team

RACE NAME, DATE, COUNTRY
ridername, place, team
ridername, place, team

and so on.

Display the race info once, and then the riders under that.

Do I join at the query? Group at the query? Group at the output?
This shows me everything:
SELECT     *
FROM riders, races
WHERE riders.raceid=races.raceid

I wish I could do this:
SELECT     *
FROM riders, races
WHERE riders.raceid=races.raceid
Group By Raceid

Any suggestions would be most appraciated.

Thanks,

JF
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to