Sorting Tables DESC
Posted: Thu Jun 26, 2003 12:17 pm
Alright,
I have a mysql table and one of the columns is named rating. Right now I'm trying to sort the contents of my database according to the rating. Here is my query:
I have a link that has the following value:
The link works fine except that it sorts the rating from least to greatest. I tried adding DESC and ASC but nothing worked, the rating is always least to greatest. Does anyone know why?
BTW, the rating type is:
decimal(2,1)
I have a mysql table and one of the columns is named rating. Right now I'm trying to sort the contents of my database according to the rating. Here is my query:
Code: Select all
<?php
$query="SELECT * FROM files WHERE category='$category' ORDER BY '$order'";
?>Code: Select all
<a href='$PHP_SELF?category=$category&order=rating'>Rating:</a>BTW, the rating type is:
decimal(2,1)