#LNameLetter#  #LNameLetter#
#lastName, #firstName#
[allowsmilie] => 1 [showsignature] => 0 [ipaddress] => [iconid] => 0 [visible] => 1 [attach] => 0 [infraction] => 0 [reportthreadid] => 0 [isusenetpost] => 1 [msgid] => [ref] => [htmlstate] => on_nl2br [postusername] => mattw [ip] => webforumsuser@m [isdeleted] => 0 [usergroupid] => [membergroupids] => [displaygroupid] => [password] => [passworddate] => [email] => [styleid] => [parentemail] => [homepage] => [icq] => [aim] => [yahoo] => [msn] => [skype] => [showvbcode] => [showbirthday] => [usertitle] => [customtitle] => [joindate] => [daysprune] => [lastvisit] => [lastactivity] => [lastpost] => [lastpostid] => [posts] => [reputation] => [reputationlevelid] => [timezoneoffset] => [pmpopup] => [avatarid] => [avatarrevision] => [profilepicrevision] => [sigpicrevision] => [options] => [akvbghsfs_optionsfield] => [birthday] => [birthday_search] => [maxposts] => [startofweek] => [referrerid] => [languageid] => [emailstamp] => [threadedmode] => [autosubscribe] => [pmtotal] => [pmunread] => [salt] => [ipoints] => [infractions] => [warnings] => [infractiongroupids] => [infractiongroupid] => [adminoptions] => [profilevisits] => [friendcount] => [friendreqcount] => [vmunreadcount] => [vmmoderatedcount] => [socgroupinvitecount] => [socgroupreqcount] => [pcunreadcount] => [pcmoderatedcount] => [gmmoderatedcount] => [assetposthash] => [fbuserid] => [fbjoindate] => [fbname] => [logintype] => [fbaccesstoken] => [newrepcount] => [vbseo_likes_in] => [vbseo_likes_out] => [vbseo_likes_unread] => [temp] => [field1] => [field2] => [field3] => [field4] => [field5] => [subfolders] => [pmfolders] => [buddylist] => [ignorelist] => [signature] => [searchprefs] => [rank] => [icontitle] => [iconpath] => [avatarpath] => [hascustomavatar] => 0 [avatardateline] => [avwidth] => [avheight] => [edit_userid] => [edit_username] => [edit_dateline] => [edit_reason] => [hashistory] => [pagetext_html] => [hasimages] => [signatureparsed] => [sighasimages] => [sigpic] => [sigpicdateline] => [sigpicwidth] => [sigpicheight] => [postcount] => 2 [islastshown] => [isfirstshown] => [attachments] => [allattachments] => ) --> help with grouping - Coldfusion - Advanced Techniques

help with grouping - Coldfusion - Advanced Techniques

I created a select statement that orders everybody last name in Alphabetical order. At the top of the page I listed the Alphabet A-Z. I would like the user to click on one of the letters (B) and it will take them to the B section. Here is my Select statement select lastName, FirstName from EMployee order by lastName <cfoutput query=Name>#lastName#, #firstName#</cfoutput>...

  1. #1

    Default help with grouping

    I created a select statement that orders everybody last name in Alphabetical
    order. At the top of the page I listed the Alphabet A-Z. I would like the
    user to click on one of the letters (B) and it will take them to the B section.
    Here is my Select statement
    select lastName, FirstName from EMployee order by lastName
    <cfoutput query=Name>#lastName#, #firstName#</cfoutput>

    rere Guest

  2. #2

    Default Re: help with grouping

    Add to your select:
    select left(lastName, 1) AS LNameLetter, lastName, ...

    <!--- Outputs the alphabet based on your query (If nobody has last name of Q,
    Q will not output). Each letter anchors down to where that name starts. --->
    <cfoutput query="..." group="LNameLetter">
    <a href="###LNameLetter#">#LNameLetter#</a>&nbsp;
    </cfoutput>

    <!--- Grouping by LNameLetter creates the anchor once --->
    <cfoutput query="..." group="LNameLetter">
    <a name="#LNameLetter#"><strong>#LNameLetter#</strong></a><br>
    <cfoutput>#lastName, #firstName#<br></cfoutput>
    </cfoutput>

    mattw Guest

  3. #3

    Default Re: help with grouping

    For some reason i'm getting an error stating Left in not a function in coldfusion
    rere Guest

  4. #4

    Default Re: help with grouping

    I know it works in MS SQL Server 2000 (just tried it). Should work in Access too. Other databases I can't speak for.

    mw
    mattw Guest

  5. #5

    Default Re: help with grouping

    ok..I'm working in Sybase and found out it supports the right function but not the left..
    rere Guest

Similar Threads

  1. Grouping Problem
    By Heather939 in forum Macromedia ColdFusion
    Replies: 4
    Last Post: June 14th, 08:03 PM
  2. Help with grouping and sum in query
    By Russ in forum Macromedia ColdFusion
    Replies: 0
    Last Post: April 28th, 04:36 AM
  3. Font grouping under OS X
    By Martin Sammtleben in forum Macromedia Freehand
    Replies: 5
    Last Post: May 24th, 12:27 PM
  4. Grouping
    By SRam in forum Informix
    Replies: 2
    Last Post: August 28th, 02:54 PM
  5. Grouping layers
    By thh webforumsuser@macromedia.com in forum Macromedia Fireworks
    Replies: 1
    Last Post: July 4th, 07:12 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •