- see footer for list info -<
I have some code which will display an a-z across the top of the screen taking the first letter from a school name in a table. I then want to pass that letter back to a second query which will bring back all schools with that first letter so that I can populate a drop down list ....

The problem is with the second query. I think its pretty self explanitory but how do I do what I am trying to do?


Regards - Paul

<cfparam name="URL.Letter" default="a">

<cfquery name="select_az" datasource="WebUserDSN">
SELECT DISTINCT LEFT(EstablishmentName,1) AS letter
 FROM School_Details
 ORDER BY LEFT(EstablishmentName,1)
</cfquery>

<cfquery name="GetSchools" datasource="WebUserDSN">
SELECT *
 FROM School_Details
        WHERE LEFT(EstablishmentName,1) = #URL.Letter#
</cfquery>

<cfoutput query="select_az">
        <a href = "tmp.cfm?letter=#letter#" class="hyperlinkBOLD">#letter#</a>
</cfoutput>

<!-- cfselect here --->


_______________________________________________

For details on ALL mailing lists and for joining or leaving lists, go to 
http://list.cfdeveloper.co.uk/mailman/listinfo

--
CFDeveloper Sponsors:-
- Hosting provided by www.cfmxhosting.co.uk -<
- Forum provided by www.fusetalk.com -<
- DHTML Menus provided by www.APYCOM.com -<
- Lists hosted by www.Gradwell.com -<
- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<

Reply via email to