You can do that by nesting a query inside a list loop across the alphabet.
the query would be:

SELECT Count(LastName) AS NumRecs
FROM Name
WHERE LastName LIKE '#Letter#%'

And use the code:

<cfif Query.NumRecs EQ 0>
    #Letter#
<cfelse>
    <a href="...?FirstLetter=#Letter#>#Letter#</a>
</cfif>

============================================================
  Russel Madere, Jr.         Senior Web Developer
  ICQ: 5446158               http://www.TurboSquid.com

Some days you eat the bear; some days the bear eats you.
============================================================


> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 26, 2001 10:42
> To: CF-Talk
> Subject: Re: Alphabetic List
>
>
> Thanks for your replies.
>
> I think I didn't elaborate the question clearly.
>
> What I need is to output the list:
>
> All - A B C D E F G H I J K L M N O P Q R S T U V W X Y Z - Lists
>
> If there are persons last names start with "B", B should be a hot link.
> If there is no one's last name starts with "Q", Q is not clickable.
>
> Thanks!
>
> Hong
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to