I would like to how to count the number of visits a person makes to a particular asp page. Let me give an example. Suppose a person is participating in an e-discussion.
we would like to know the number of questions he has answered, the number of questions he has just seen but not answered and the number of questions not at all seen by him.
i have implemented the below code into all of my pages within my website. my impression was that when a physical human being reaches each page the code will enter an increase of 1 into my database for that particular page. i have noticed the hits have been way high but i dont believe that a human is generating these hits.
Are bots and other programs on the net able to generate hits into my database according to my code? Code:
Basically everytime I need a page to access a database I will create a connection object, and then at the end of the page I will close the connection object.
Would it be more sensible to create all the connections to the database that a user will need when they first visit the site, and then close these connections once they leave the site. (Using something to do with Start Session and End Session).
I fould this code on another page and have included it on may main page. I would like to know 2 things. How can i cange the database connection to DSN less and i would like to know how i can add code to get the total hits and add it to a Field called "totalhits" in my access database. Code:
Is there another way to count the records of an access database that have a specific field other than using a SELECT statement and a recordset to loop through the records?
I am using a lot ASP to manage a db for the students I work with in a YMCA program. What do I need to change to be able to count and print the # of records (like on a roster)
<% fp_sQry="SELECT * FROM Results WHERE (Grade = 'Senior') ORDER BY Club ASC" fp_sDefault="Club=" fp_sNoRecords="No records returned." fp_sDataConn="2004" fp_iMaxRecords=256 fp_iCommandType=1 fp_iPageSize=125 fp_fTableFormat=True fp_fMenuFormat=False fp_sMenuChoice="" fp_sMenuValue="" fp_iDisplayCols=23 fp_fCustomQuery=True BOTID=0 fp_iRegion=BOTID %>
What is the best way to count how many times an image has been clicked? I have an image gallery on a site and want to count how many times each image has been clicked (clicking pulls up the full size image in a window) so that I know which are popular and which are not. I though about wimply adding an extra field to the database which serves up the image details, and incrementing a number by 1 each time a user clicks it just before the image is served up. What are the chances of this falling over if two people were to click the same image at the same time?
I need to find the total number of nodes in a binary tree structure ( Its for a mlm website), Also I need to count the total subnodes in leftside and right side separately.
Check the attachments, You will get the idea. Attachment contains database structure and Binary Tree Structure.
For example: If I had a table with the headings ID Colour Car 1 Blue Volvo 2 Red Fiesta 3 Green Mondeo 4 Red Volvo 5 Red Fiesta 6 Blue Fiesta
How could I use asp to count how many times say the colour red appeared in the table displayed in a numeric value, i.e There are 4 red cars in the able
I have a access data base that has several records. One filed contains a category numbers. Many of the records have the same category number becase they belong to the same category. How can I get the number of records that have the same category number? or should I say how can I count the records wich have the same category number?
Access database. What is the best method to count a field that has the numbers 1 - 93 in it, over 1008000 rows long. Trying to obtain how many times 1, 2, 3 etc show up in this field.
I have fields called EventName and EventVolunteer. What I want to do is do a count of volunteers for each event. Then as it loops though the database the results display next to the Event Name.
I'm trying to count the number of occurances of a product as it is outputted from a database (the information has been split from the quantity so can't just use SQL)
I use - if RecordArray(0)="ProductName" then productoccurance=productoccurance+ProductQuantity
It counts some an not others or only a few. But the result is the same everytime. E.G, I have 10 occurances of product1 in the database the this script only ever counts 4. Any ideas as to what's wrong?
I need to display the count of days on the page where the start date is the result of the record set and the end date is the current date. So if the record set value was 3/04/2007 than the display on the page would be "3" ( with todays date: 3/07/2007 as the end date). I know I need to use datediff(d,???? ) you can see where I get lost.
I am trying to work out how to set up two counters on my site, one to track guest users and one to track registered users, like most forums show. There are loads of examples showing how to use the global.asa file to do a single active user count, but I can't find anything for my needs.
Has anyone come across such a script, or give me a clue how to write my own? All registered users are marked by a session variable called userLogged - which is true if they have logged in.
I am trying to count with time, like you can count with a date, but it's not working
In date I would do: DateValue(Now)+1
when I Do TimeValue(Now)+30, it does not display what the time would be 30 seconds later, but instead it shows me the time it is right now and sticks a weird date (1-1-1900) in front of it, what am I doing wrong?
I need to count the different values from within a database column. It's a "State" field so I'm trying to find out how many people from CA, from NY, from TX, etc.
I have no problem with the SQL to get the number, my problem is having this number displayed on the ASP page (it doesn't) ... I'm sure I'm missing something so I wanted to run it by here to see if someone could get me on the right path.
What I'm trying to do is list all the States on an ASP page and have a number beside each state representing the total for that state in the database. EG:
NY = 5 CA = 6 TX = 22 etc
Any ideas or suggestions on the best way to do this would be appreciated. I've tried some of the ASP "quick lessons" on the web but haven't really found anything that fits this situation.
I have an array which is made up of a selection of place names, such as "London, London, Lisbon, Paris, London, Madrid, London, Madrid", what I need to do is loop through the array and get it to find out which item is duplicated the most times, and then have this item equal to a variable, such as TopPlace, which in this case would be TopPlace = London, I have no idea how to achieves this, could someone offer me any help on doing this?
I am trying to show some stats. However I have four levels to choose from, which are shown as true/false. I want to count each entry by employee and categorize it only under the highest level achieved. One entry can have multiply Levels. Hope this make sense my mind is a little foggy today.
Here is the sql statement I am using. I have added the levels as or however I want to count each level but only the highest level achived. I don't know if it would be easier to do this in a SQL statement or in vb script. Code:
I have several isbn's that are eather 10 or 12 charcters long. I need to insert a dot . after the fifth character if it is 10 long, and after the 6th character if it is 12 long. How do I count through the string and find out if it is 10 or 12 charaters long, then insert the dot . after the first 5 if it's 10, or after the first 6 if it's 12?
On a site, I've documents that can be downloaded. To fill the html page, I read a table in an access database and I write my code Each document has a title, an url, an id and a variable "counter" How can I increment the counter (in the database) and open the docuemnt in the same operation
I have this line of code in my global.asa Application("Active") = Application("Active") + 1 . I open alot of new IE windows and I have my homepage set to my intranet that contains the above code. I had the same code in my IIS5 web and I don't remember it counting me each time I came in. I know it did if I would close all IE and open a new one but not if I had one opened then opened a new one. Is there something diferent here in IIS6?
The homepage is behind authentication and it makes me authenticate with any new IE window. Is there a setting missing? I thought IE would cache the permissions.
i hv 2 build a E-Learning system which will provide questions 2 t users & once they answer it,the system need to count the score. i created a database consist of Question & t correct answer,a need u'llz help for coding which will check t answer given by user vit t correct answer n give t score
here's t design of the database ________________________ |Question | Correct Answer | |________|______________| | | | | | | | | | ....
I have a query that is supposed to return only 1 record, however I recently found that because of an error in the database it can return more than 1. So what I need to do is capture if it is more than 1 record and alert the user to contact the database administrator. How can I get the count of records returned by a recordset? Is there no way besides looping through with a counter variable?
I need to count the number of rows in a table, and set the number to a variable so I can use it as a sentinel for a control loop . I know I'm supposed to use Count(*) but i'm not quite sure of the syntax. for i=1 to (the number of rows in the table) if breakloop=true then exit for (CODE) next .