Webmastersite.net
Register Log In

bug in Top List
sorting does not work correctly

Comments on bug in Top List

fresco
Forum Regular

Usergroup: Customer
Joined: Feb 19, 2003

Total Topics: 23
Total Comments: 106
fresco
Posted Sep 13, 2008 - 9:43 PM:

Hi on my homepage:
http://truefresco.org/link_directory

on the bottom is a toplist with 10 latest links.

well the latest link in the list has ID of 1699, however thereare sites added after that with IDs 17XX

any advise?
Paul
developer

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

Total Topics: 61
Total Comments: 7868
Paul
Posted Sep 14, 2008 - 2:48 AM:

You must be counting wrong or not understanding that not every id in the database corresponds with an active link, because your queries show it's ordering id descending. Though really you should order it by time descending, since ids don't have to be sequential if the autoinc gets reset to a deleted spot.
fresco
Forum Regular

Usergroup: Customer
Joined: Feb 19, 2003

Total Topics: 23
Total Comments: 106
fresco
Posted Sep 14, 2008 - 10:15 AM:

this is what i have in template

links,id,10,descending,,,,0,0,0,0,0,0,,0

abou t 10 sites are added after "newest" that list shows

it only stared happening with id going over 1699
Paul
developer

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

Total Topics: 61
Total Comments: 7868
Paul
Posted Sep 14, 2008 - 10:09 PM:

If you had link ids displayed anywhere I could comment, but since you don't I can't say anything beyond post #2.
fresco
Forum Regular

Usergroup: Customer
Joined: Feb 19, 2003

Total Topics: 23
Total Comments: 106
fresco
Posted Sep 15, 2008 - 2:09 PM:

is this what you are asking about - site with link ID 1704

Modern Metal Art by Nicholas Yust

www.truefresco.org/link_dir....php?action=detail&id=1704

the site on the top of the list on the home page - "10 most recently added" in (descending) order is 1699


●André Ponce - painter

www.truefresco.org/link_dir....php?action=detail&id=1699


as you can see the

Modern Metal Art by Nicholas Yust should be in the list above

●André Ponce - painter
Paul
developer

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

Total Topics: 61
Total Comments: 7868
Paul
Posted Sep 15, 2008 - 9:40 PM:

Run this query in phpmyadmin:
SELECT * FROM wsnlinks_links WHERE validated=1 AND hide=0 AND deleted=0 AND inhidden=0 AND (invisibleto NOT LIKE '%|1|%') AND effectivetime < 1221539865 AND alias=0 AND inalbum=0 ORDER BY id DESC LIMIT 0,10

Does that give you what you expect? If not, does
SELECT * FROM wsnlinks_links WHERE validated=1 AND hide=0 AND deleted=0 AND inhidden=0 AND effectivetime < 1221539865 AND alias=0 AND inalbum=0 ORDER BY id DESC LIMIT 0,10

give you what you expect? If not, does
SELECT * FROM wsnlinks_links ORDER BY id DESC LIMIT 0,10

give you what you expect? If not, your mysql is insane or you somehow have id as a non-integer field.
fresco
Forum Regular

Usergroup: Customer
Joined: Feb 19, 2003

Total Topics: 23
Total Comments: 106
fresco
Posted Sep 16, 2008 - 7:23 AM:

first one gives everything just like the site - 1699 ID is on top (1704 does not show)


second one - gives correct order (however for some strange reason - fonts in phpMyadmin are larger, when i use that string..?)


last one - gives all, including deleted links - 1705 ID (deleted link) is on top and 1699 is below
Paul
developer

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

Total Topics: 61
Total Comments: 7868
Paul
Posted Sep 18, 2008 - 3:23 AM:

Since the second gives what you expect, that means #1704 is marked as not being visible to guests (and possibly other groups). Probably relates to the recent 5.0 issue, but I don't see how it could've gotten into 4.1, unless it was always that way and somehow never noticed. Backporting the 5.0 fix now.
fresco
Forum Regular

Usergroup: Customer
Joined: Feb 19, 2003

Total Topics: 23
Total Comments: 106
fresco
Posted Sep 23, 2008 - 7:56 PM:

i am not sure what do you mean by "Backporting the 5.0 fix now" - I did not get any updates in my admin.

is there a file i need to download?
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



Sorry, you don't have permission to post posts. Log in, or register if you haven't yet.