ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Sorting Author List

April 22, 2012 12:06am

Subscribe [1]
  • #1 / Apr 22, 2012 12:06am

    Tom Spetter

    25 posts

    Hi,

    I am using the query below, from Mark Bowen

    http://ellislab.com/forums/viewthread/101822/

    {exp:query sql="
    
    SELECT member_id, screen_name, username FROM exp_members WHERE group_id='1'
    
    "}
    <a href="http://{path=%22author-entries%22}{username}" title="View {screen_name}'s posts">View {screen_name}'s posts</a>
    {/exp:query}

    Anyhow, can anybody see a way of sorting this Alphabetical by the Screen Name? I’m not really familiar with Queries, and the normal orderby=”” doesn’t seem to work.

    Thanks.

  • #2 / Apr 22, 2012 12:33am

    Bhashkar Yadav

    727 posts

    {exp:query sql="SELECT member_id, screen_name, username FROM exp_members WHERE group_id='1' ORDER BY screen_name ASC"}
    <a href="http://{path=%22author-entries%22}{username}" title="View {screen_name}'s posts">View {screen_name}'s posts</a>
    {/exp:query}
  • #3 / Apr 22, 2012 12:44am

    Tom Spetter

    25 posts

    That’s Perfect! Thank you Bhashkar!

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases