Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2003
    Location
    Fairfield, CT. USA
    Posts
    1

    Question Unanswered: "Order By" Question

    Here's a quick one....

    I know the results of a select statement are going to have 3 values. For the sake of argument I'll assume these values will be: 100, 202, 99. How can I ask mysql to sort the output in that order?

    -DS

  2. #2
    Join Date
    May 2002
    Location
    Vancouver Canada
    Posts
    26
    You could probably do it by using IF() functions on each of the columns you are selecting.

    I don't understand the sorting method you are wanting though, could you explain it better?

  3. #3
    Join Date
    Nov 2003
    Posts
    91
    A simple way to make this work is to add a new
    column called something like 'SORT_ORDER' that
    contains an integer. You can then sort on this column.

Posting Permissions

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