Skip to main content
Known Participant
February 20, 2007
Question

viewed files

  • February 20, 2007
  • 9 replies
  • 750 views
How do i display how many times a file has been viewed
This topic has been closed for replies.

9 replies

Known Participant
February 21, 2007
got it done thanks everyone!
Inspiring
February 21, 2007
You can use dreamweaver to do this for you.

1) In the server behavior panel click on the plus (+) sign and select command.
2) Name it whatever you want maybe omething like totalViews
3) Select the connection
4) set the type to UPDATE

Your query will look something like this:
UPDATE bandDetails (your tablename)
SET TotalViews = TotalViews + 1 (your field in the DB for keeping count of views)
WHERE bandID = ParamBandID

ParamBandID would be request.queryString("bandID")

Thats it, hit OK and everytime a specific band's info is vied it will be updated in the database.
Known Participant
February 21, 2007
im afraid im a little confused
The table name =Artisttable
coloum for counting = pageviews
coloum for artistsid = ID

Your query will look something like this:
UPDATE Artisttable
SET TotalViews = TotalViews + 1 (pageviews)
WHERE ID = ParamID

ParamBandID would be request.queryString("ID")

is this right

Known Participant
February 21, 2007
UPDATE Artisttable
SET pageviews = pageviews + 1
WHERE ID = ParamID

ParamID would be request.queryString("ID")

ive tried this but it isnt updating the database
Inspiring
February 20, 2007
Each time the page is opened, a scripted routine in the head of the page
reads in the value of the viewed field, increments it, assigns that value to
a variable, and writes it back to the database.

Later on the page, you write the value of that variable to the page.

Do you know enough ASP to do that?

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================


"rob dalton" <webforumsuser@macromedia.com> wrote in message
news:erfphv$g87$1@forums.macromedia.com...
> sorry bud i dont follow. how do i get the number of times the details page
> has been viewed to show up on the details page. if you can go through it
> with me in a few steps id appreciate it.


Known Participant
February 21, 2007
i have a colum in my artists table called pageviews i set this to numeric and set the default value to 0 can i use a bit of sql to configure it to show how many times each file has been viewed
Known Participant
February 20, 2007
could i not do it using a table and a query in database
Inspiring
February 20, 2007

"rob dalton" <webforumsuser@macromedia.com> wrote in message
news:erfo5p$b3n$1@forums.macromedia.com...
>i need to know how many times a page for musicians details has been viewed
>these details are held in a datbase i dont think its the same thing as just
>a stat counter is it?

you could use some log analysis software to parse through the logs for a
particular string, i.e. www.site.com/people/index.php?recNum=14


Known Participant
February 20, 2007
sorry bud i dont follow. how do i get the number of times the details page has been viewed to show up on the details page. if you can go through it with me in a few steps id appreciate it.
Inspiring
February 20, 2007
In the head of the page is a server script that increments a counter field
in the database.

That number is then shown on the page.

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================


"rob dalton" <webforumsuser@macromedia.com> wrote in message
news:erfo5p$b3n$1@forums.macromedia.com...
>i need to know how many times a page for musicians details has been viewed
>these details are held in a datbase i dont think its the same thing as just
>a stat counter is it?


Known Participant
February 20, 2007
i need to know how many times a page for musicians details has been viewed these details are held in a datbase i dont think its the same thing as just a stat counter is it?
Inspiring
February 20, 2007
There are a number of free counter scripts out there if you want a public
display, otherwise your webhost should have a stats that you can look at.

--
Paul Whitham
Certified Dreamweaver MX2004 Professional
Adobe Community Expert - Dreamweaver

Valleybiz Internet Design
www.valleybiz.net

"rob dalton" <webforumsuser@macromedia.com> wrote in message
news:erfl69$7m8$1@forums.macromedia.com...
> How do i display how many times a file has been viewed