Gossamer Forum
Quote Reply
Total number of links
Hi,

I'm using grand_total variable to dispaly total number of links. It says I have 4,110 links.

When I count all links in categories (number on the right of category name), I got 4,106 links.

In Link status od GLinks admin, is says total of 4,085 links.

Which one is correct?!

Regards.

UnReal Network
Quote Reply
Re: [DeadMan] Total number of links In reply to
MMm, try doing a Database > Repair Tables

Also, what do these tables show as counts:

glinks_Links
glinks_CatLinks

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Total number of links In reply to
I did Repair Tables. Nothing happen. Still the same.

glinks_CatLinks => 4110
glinks_Links => 4085

Regards.

UnReal Network
Quote Reply
Re: [DeadMan] Total number of links In reply to
Ok, well from a wild guess - it looks like the count() is done on the glinks_CatLinks table (probably as its a smaller table - in terms of the number of fields etc)

Not a lot you can do about that rllaly, appart from maybe making another global - something like:

get_total_count
Code:
sub {
return $DB->table('Links')->count( { isValidated => "Yes" } ) || 0;
}


and call with:

<%get_total_count%>

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Total number of links In reply to
Ok. Just to make clear.

CatLinks is number of links in all categories. This is not real number of links because one link can be in multile categories.

Links is real number of links in database.

Is this right?

And, why when I count links in categories (when I cound number which is beside category name) I got total different number?

Regards.

UnReal Network
Quote Reply
Re: [DeadMan] Total number of links In reply to
Hi,

Yes, that is correct.

Quote:
And, why when I count links in categories (when I cound number which is beside category name) I got total different number?

Not sure - maybe Adrian/someone from GT could clarify that a bit :)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [DeadMan] Total number of links In reply to
grand_total is the number of entries in the CatLinks table - non-validated links - expired links
Number_of_Links (column in the category table) is the total number of links in that category and its children (possibly duplicates, but doesn't include non-validated links)

The counts are done a little differently, so there may be some discrepancies. The other issue is that doing a proper count is database intensive and slow.

Adrian