Home : Products : Gossamer Links : Discussions :

Products: Gossamer Links: Discussions: Re: [jwalter] Record Page Views for Categories: Edit Log

Here is the list of edits for this post
Re: [jwalter] Record Page Views for Categories
If you use page.cgi, you can easily add a sub that updates a column called something like CatHits in the Category table:

1) Add a column called CatHits in the Category table (via MySQLMan) -> This should be either an INT or SMALLINT data type field, use the following attributes:

Data Type: INT (or SMALLINT)
Null
Default Value: 0

2) Then add a sub that includes the following SQL (or add a global tag that includes the SQL):

Code:

Update Category
SET CatHits = CatHits + 1
WHERE CategoryID = $catid


Of course you would have define $catid as the category id that the user is in at the time the table is updated.

Best of luck...
========================================
Buh Bye!

Cheers,
Me

Last edited by:

Chewbaca: Nov 2, 2001, 10:59 AM

Edit Log: