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)