Jump to content

[SOLVED] Why wont it work?


paulman888888

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.