Ah that's much better than my version, use Tim's one Paul!
-----Original Message-----
From: Tim Blair [mailto:[EMAIL PROTECTED]
Sent: 02 February 2004 15:59
To: [EMAIL PROTECTED]
Subject: RE: [ cf-dev ] Another interesting problem ...
> Can I do the above? How can I populate the list / array with
> the first letter?
's not necessarily
Add another column to the query which is the first letter:
<cfquery name="select_az" datasource="schoolsBudget">
SELECT schoolName, dfesNo, LEFT(schoolName,1) AS firstletter
FROM "table$"
ORDER BY SchoolName
</cfquery>
Then group the output based on that field:
<cfoutput query="select_az" group="firstletter">
<a name="#select_az.firstletter#" />
<h3>#select_az.firstletter#</h3>
<cfoutput>
#select_az.schoolName# (#select_az.dfesNo#)<br>
</cfoutput>
</cfoutput>
Tim.
-------------------------------------------------------
Try the ColdFusion Coding Contest! Current contest:
Maze Solver - http://tech.badpen.com/cfcontest/
-------------------------------------------------------
RAWNET LTD - Internet, New Media and ebusiness Gurus.
WE'VE MOVED - for our new address, please visit our
website at http://www.rawnet.com/ or call us any time
on 0800 294 24 24.
-------------------------------------------------------
This message may contain information which is legally
privileged and/or confidential. If you are not the
intended recipient, you are hereby notified that any
unauthorised disclosure, copying, distribution or use
of this information is strictly prohibited. Such
notification notwithstanding, any comments, opinions,
information or conclusions expressed in this message
are those of the originator, not of rawnet limited,
unless otherwise explicitly and independently indicated
by an authorised representative of rawnet limited.
-------------------------------------------------------
--
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]
--
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]