Webmastersite.net
Register Log In

Secondary Sort Order
Can't get it to work right.

Comments on Secondary Sort Order

stujoe
Beginner

Usergroup: Customer
Joined: May 11, 2005

Total Topics: 2
Total Comments: 4
stujoe
Posted May 16, 2005 - 9:15 PM:

I don't know if I am doing something wrong or not. I have my primary sorting of links as rating descending but no matter what I make the secondary sort order, it won't display them in that order after rating.



Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted May 17, 2005 - 11:46 AM:

If there are many votes, it seems unlikely that there would be absolutely exact ties in rating.
stujoe
Beginner

Usergroup: Customer
Joined: May 11, 2005

Total Topics: 2
Total Comments: 4
stujoe
Posted May 17, 2005 - 4:48 PM:

Obviously, But it is noticeable on the links that do not have votes yet. Hence they are all 0 rating. The site was just started a couple of days ago so many are not rated yet.
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted May 21, 2005 - 12:23 PM:

In index.php, change
else if ($todo == 'orderlinks')
{
$orderlinks = "ORDER BY $orderlinks $ascdesc";
if ($settings->orderlinks2 != '') $orderlinks .= str_replace('ORDER BY ', ',', $settings->orderlinks2);
}

to
else if ($todo == 'orderlinks')
{
$orderlinks = "ORDER BY $orderlinks $ascdesc";
}
if ($settings->orderlinks2 != '') $orderlinks .= str_replace('ORDER BY ', ',', $settings->orderlinks2);
stujoe
Beginner

Usergroup: Customer
Joined: May 11, 2005

Total Topics: 2
Total Comments: 4
stujoe
Posted May 21, 2005 - 3:41 PM:

Thank you! You guys who can code amaze me. I looked for a good while to try and figure it out and came up totally empty!

Thnaks again.
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



This thread is closed, so you cannot post a reply.