Thanks!
-----Original Message-----
From: mayo [mailto:[EMAIL PROTECTED]
Sent: Friday, August 08, 2003 3:19 PM
To: CF-Talk
Subject: RE: check first letter
>From the way you describe it I take it that you would like to have an A-Z
navigation; have all the titles displayed on one page (so that people could
scroll down through all your titles); and have all the the titles starting
with a particular letter reached through an anchored link.
At least that's the way I read "I want to check each title by its first
letter so I can create a bookmark to it."
How are you dealing with common words in the title such as "A, An, The"
Personnally I think the time honored SQL solution is the best.
You can have a navigation as follows: ALL | A | B | C | D | ... | X | Y | Z
| ALL
IF ALL is selected do a :
SELECT fields
FROM tables
SORT BY title ASC
IF letter Z is selected do a:
SELECT fields
FROM tables
WHERE title LIKE 'Z%' // syntax will be different according to db
To simplify matters the link could be
<a href="somefile.cfm?bookTitle=A">A</a>
<a href="somefile.cfm?bookTitle=B">B</a>
somefile.cfm
<cfparam name="bookTitle" default="whatever">
<cfquery name="getTitles" datasource="yourDatasource">
SELECT fields
FROM tables
WHERE title LIKE '#bookTitle#%'
</cfquery>
good luck
Gilbert Midonnet
-----Original Message-----
From: Robert Orlini [mailto:[EMAIL PROTECTED]
Sent: Friday, August 08, 2003 9:52 AM
To: CF-Talk
Subject: check first letter
I need to do an alphabetical check of each book title in a long list. I want
to check each title by its first letter so I can create a bookmark to it.
Anyone have a simple CF code that can search the first letter in a text
string?
Still a newbie. Thanks.
Robert Orlini
HW Wilson
718-588-8400 x2656
���
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription:
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Get the mailserver that powers this list at
http://www.coolfusion.com
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4