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 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. 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 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
Archived
This topic is now archived and is closed to further replies.