Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

Total Count..what table and row?

Quote Reply
Total Count..what table and row?
Hi. I'm trying to see what table/row etc the total links count is at. I am trying to make a script that will call that and then return the total amount of links. Thne I am going to do a SSI cal to that script so I can post the total number of links on another page. Could someone please tell me where it is?

Thanks

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: [AndyNewby] Total Count..what table and row? In reply to
Uh oh. I sense a studying session at mysql.com is needed.

The tables don't hold that information you need to execute a query to get it.

SELECT COUNT(*) FROM table;

Last edited by:

PaulW: Nov 15, 2001, 10:13 AM
Quote Reply
Re: [PaulW] Total Count..what table and row? In reply to
Quote:
Uh oh. I sense a studying session at mysql.com is needed.

Why?

I'm learning mySQL at the moment at work. Its not really that hard once you learn the basics Wink


Why dont the tables hold the information? Links 2 used to hold it in a file didnt it? So surelythe coule be a table called 'count' or something that holds it? Seems a bit silly to me really Wink

I just have been having a look around, and maybe another template would do the job, and then just call <%grand_total%> ?!?!?

Thanks


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: [AndyNewby] Total Count..what table and row? In reply to
No, Links 2.0 does not hold a count anywhere. You're thinking of the file that stores the last ID number, which is not necessarily the total number of links.

--Philip
Links 2.0 moderator
Quote Reply
Re: [AndyNewby] Total Count..what table and row? In reply to
Andy there is no table. You need to execute a query. Having a table just to store the count would be stupid.

You need to dig into the tutorials at mysql.com because you are thinking in "flatfile mode"
Quote Reply
Re: [ThatPerson1024] Total Count..what table and row? In reply to
Oh...ok...I'll have a go at it that way Tongue

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: [AndyNewby] Total Count..what table and row? In reply to
Take a look at the Links Help documentation.

It outlines the full set of file functions.

You can do this with about 2 lines of links code, using the Links SQL interface.

Connect to the database table, then get->total()

That will return the links count for that table.

Part of the beauty of Links SQL is that all these functions exist. To write scripts,
you just link them together.




PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.