ORDER BY is not sorting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sorry, this seams very trivial but I can not sort the result set for any 
field.  What am I doing wrong?


php & mySQL 5


<?php

...

   $table_name ='users';

    // Select records
    $result = mysql_query("SELECT * FROM $table_name ORDER BY rowID DESC");


    // Loop through the record set
    while($row = mysql_fetch_array($result)) {
         print 'rowID ='          .$row['rowID']. '<br />'
    }

?>

1
2
3
4


TIA
Mark

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux