You mean like:

School Type 1
- School 1
- School 2
- School 3

School Type 2
- School 4
- School 5
- School 6

?

Try this:

<cfquery name="schools" datasource="SOMETHING">
        SELECT s.SchoolName, s.SchoolID, st.SchoolType
        FROM School s
        INNER JOIN SchoolType st ON s.SchoolTypeID = st.SchoolTypeID
        ORDER BY st.SchoolType, s.SchoolID
</cfquery>

<cfoutput query="schools" group="SchoolType">

        <p>
                #schools.SchoolType#<br />
                <cfoutput>
                        - #schools.SchoolName#<br />
                </cfoutput>

        </p>

</cfoutput>

Simmer for 20 minutes and server straight away...

Adrian

-----Original Message-----
From: Steven Sprouse [mailto:[EMAIL PROTECTED]
Sent: 19 July 2006 15:39
To: CF-Talk
Subject: Need help building pages with multiple queries and tables


I'm new to this forum.  I'm hoping there's someone out there that can help
me with my problem.

I'm trying to build a school directory similar to thi
(http://www.mcps.k12.md.us/schools/index.cfm) or this
(http://www.wcboe.k12.md.us/content/sch_schools.cfm)

I have a Table named Schools with SchoolID, SchoolName, SchoolType,
SchoolAddr, etc. and I also have a table called SchoolType with a fieldname
of SchoolType that just lists Elementary, Middle, High, Center/Program.

I don't know if I set my database up incorrectly or not, but I can't figure
out a query (and the query string that I know I need) to get the first page
to output a list of schools by School Type, and then when you click on the
Go button or the School Name, it brings you to a page with information
Specific to that school.

Can anyone out there PLEASE help me?



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/cf_lists/message.cfm/forumid:4/messageid:247044
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to