I am getting users names from one table and joining the years they have been with us
in another. How would I join the two together and ouput the years (1995,1996,1997)
along with their name.
Here are the tables:
crew
===
id, first_name, last_name, email
crew_years (crewid = id
that was provided the other day if
you want to grab people without any years associated with them.
Adam.
-Original Message-
From: Paul Giesenhagen [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 22, 2002 3:19 PM
To: CF-Talk
Subject: OT: Getting single records with multiple records
: Getting single records with multiple records from a join
I am getting users names from one table and joining the years they have
been with us in another. How would I join the two together and ouput the
years (1995,1996,1997) along with their name.
Here are the tables:
crew
===
id
I am getting users names from one table and joining the years
they have been with us in another. How would I join the two
together and ouput the years (1995,1996,1997) along with their name.
Here are the tables:
Use a standard JOIN, but don't use just a CFLOOP or CFOUTPUT, instead
using
single records with multiple records
from a join
I am getting users names from one table and joining the years
they have been with us in another. How would I join the two
together and ouput the years (1995,1996,1997) along with their name.
Here are the tables:
crew
]
Sent: Wednesday, May 22, 2002 3:25 PM
Subject: RE: Getting single records with multiple records from a join
SELECT
c.id,
c.first_name,
c.last_name,
c.email,
cy.year
FROM crew c, crew_years cy
WHERE c.id = cy.crewid
cfoutput query=thequery group=id
#first_name# #last_name#: cfoutputyear
6 matches
Mail list logo