paulman888888 Posted May 29, 2008 Share Posted May 29, 2008 my code wont work. It worked with the DESC, but i want it in descending order. This is my code <?php // Get all the data from the "example" table $result = mysql_query("SELECT * FROM example ORDER BY DESC score") or die('Theres an error'); echo "<table border='1'>"; echo "<tr> <th>Name</th> <th>Score</th> </tr>"; // keeps getting the next row until there are no more to get while($row = mysql_fetch_array( $result )) { // Print out the contents of each row into a table echo "<tr><td>"; echo $row['name']; echo "</td><td>"; echo $row['score']; echo "</td></tr>"; } echo "</table>"; ?> please help Thankyou Quote Link to comment https://forums.phpfreaks.com/topic/107781-solved-why-wont-it-work/ Share on other sites More sharing options...
Daniel0 Posted May 29, 2008 Share Posted May 29, 2008 Do ORDER BY score DESC instead. Quote Link to comment https://forums.phpfreaks.com/topic/107781-solved-why-wont-it-work/#findComment-552452 Share on other sites More sharing options...
paulman888888 Posted May 29, 2008 Author Share Posted May 29, 2008 thankyou it works fine Quote Link to comment https://forums.phpfreaks.com/topic/107781-solved-why-wont-it-work/#findComment-552456 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.