Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3

Thread: order by

  1. #1
    Senior Coder
    Join Date
    Dec 2005
    Location
    Slovenia
    Posts
    1,958
    Thanks
    120
    Thanked 76 Times in 76 Posts

    order by

    Code:
    1  2   4
    2  2   10
    3  2   5
    When I select from this I have to oder by first column
    The second col represent a group of records
    What I need to is order by third col too, within second column
    so the result would be:

    Code:
    1  2   4
    2  2   5
    3  2   10
    I know, select from select .....
    but is there something smarter ?
    Found a flower or bug and don't know what it is ?
    agrozoo.net galery
    if you don't spot search button at once, there is search form:
    agrozoo.net galery search

  • #2
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,020
    Thanks
    75
    Thanked 4,323 Times in 4,289 Posts
    Umm...are those values all from the same table??

    Because what you are asking for is to break apart the records and the re-build them as a completely new set of records.

    select from select, or joining one select to another, is only way I see to do something like that.

  • #3
    Senior Coder
    Join Date
    Dec 2005
    Location
    Slovenia
    Posts
    1,958
    Thanks
    120
    Thanked 76 Times in 76 Posts
    yes same table, table of hirearchical nested set model.

    Will see what I can do.
    Found a flower or bug and don't know what it is ?
    agrozoo.net galery
    if you don't spot search button at once, there is search form:
    agrozoo.net galery search


  •  

    Posting Permissions

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