- see footer for list info -<
Perhaps this is more/less efficient (dunno):

WHERE   EstablishmentName   LIKE    '#URL.Letter#%'


Duncan Cumming wrote:

- see footer for list info -<
missing apostrophes?
WHERE LEFT(EstablishmentName,1) = '#URL.Letter#'



Duncan Cumming
New Media Developer
Customer Relations Management / Education
Fife Council
700 4105 / 01592 414105

[EMAIL PROTECTED] 07/10/2005 16:19 >>>
- 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 -<


**********************************************************************
This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed and should not be disclosed to any other party. If you have received this email in error please notify your system manager and the sender of this message.

This email message has been swept for the presence of computer viruses but no 
guarantee is given that this e-mail message and any attachments are free from 
viruses.

Fife Council
Tel: +44 (0) 1592 414141
**********************************************************************
_______________________________________________

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 -<


_______________________________________________

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