Order By question

Discussion in 'PHP' started by joaquin, Apr 4, 2010.

  1. #1
    Hey guys

    I have a PHP & Mysql question. When I input a regular ORDER BY 'name' query, I usually get the results I want when either the first character is a letter or a number.

    However, when the database values look something like "n.1, n.2, n.3 etc..." the returned value is random i.e., it can return n.2 then n.1 and so on.

    Is there a way to make mysql return the values in an ordered way?
     
    joaquin, Apr 4, 2010 IP
  2. Brandon.Add.On

    Brandon.Add.On Peon

    Messages:
    178
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You could specify ASC or DESC in the query.
     
    Brandon.Add.On, Apr 4, 2010 IP