Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2004
    Posts
    82

    Unanswered: Order By ordering wrong

    Heres the problem when I order certain information from my database for example:

    Number: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11

    It would echo when called with PHP as:
    1, 10, 11, 2, 3, 4, 5, 6, 7, 8, 9


    I can see why it does this but is there a way so it will echo in a chronological order the PHP I am using is:

    PHP Code:
    $getnums = ("SELECT * FROM my_table WHERE var = '1' ORDER BY number ASC");
    while (
    $row mysql_fetch_array[$getnums]){
    $numbersindb $row['number'];
    echo 
    $numbersindb

  2. #2
    Join Date
    Aug 2004
    Posts
    82
    opps, sorry...The table structure was varchar and needed to be INT to order numerically...how stupid >.<

Posting Permissions

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