Select Users Whose Last Name Falls in Alphabet Range

Posted on 2008-11-16
Last Modified: 2012-05-05
I have a page from which users can select to produce a PDF file of the attendance sheet.

I can select users by profession. I would like the user to also be able to narrow down each sign in sheet by first letter of last name. So they can select the letter A and the letter K to get all the people who signed up for the workshop whose last name's first letter falls in the range between A and K.

Any suggestions?
Question by:gianchi66
    LVL 29

    Accepted Solution

    sql: select * from attendees where lower(left(lastname,1)) between 'a' and 'k'

    Author Closing Comment

    I guess it wasn't that hard... but I had never done it!

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Join & Write a Comment

    Quite often, your web application, web site, AJAX code or web service does not work in the way you expect it to. In these cases, it may be necessary to "look under the hood" of the http protocol and to look at either client requests, server replies…
    Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit ( and similar technologies have enjoyed wide adoption, making it possib… provides powerful tools for surveying targeted groups, and utilizing data from completed surveys to find trends, discover areas of demand or customer expectation, and make business decisions on products or services.
    Use Wufoo, an online form creation tool, to make powerful forms. Learn how to choose which pages of your form are visible to your users based on their inputs. The page rules feature provides you with an opportunity to create if:then statements for y…

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now