Tutorials
Sorting by Favorite
-
Sorting by Favorite
Posted on July 1, 2003
Written by
Louise (view more by Louise)
Comments (0)
Filed under Scripts: PHPFanBase, Tutorials
This will show you how to sort your members on the members.php and country.php pages by their favorite (instead of ID, name or country).
You will need to edit one line in members.php and country.php for this.
Open up both in your HTML editor.
Find the following line in country.php (#5):
$query="SELECT * FROM $table WHERE apr='y' AND country='$id' ORDER BY $countrysort ASC";
Change it to:
$query="SELECT * FROM $table WHERE apr='y' AND country='$id' ORDER BY fave ASC";
Now find this line in members.php (#6):
$query="SELECT * FROM $table WHERE apr='y' ORDER BY $allsort ASC";
And change it to:
$query="SELECT * FROM $table WHERE apr='y' ORDER BY fave ASC";
That’s all there’s to it!
Comments
Comments are closed for this entry.