does any one know how to do this?

Results 1 to 2 of 2

Thread: does any one know how to do this?

  1. #1
    Join Date
    Dec 1969

    Default does any one know how to do this?

    I have an access database that uses asp on a web site. I search query is used to extract the relevant the pages arent static. Can someone direct me to find some code which deals with counting specific records being displayed (eg the number of times Mr Smiths profile has been displayed). All the counters Ive seen so far only deal with static pages which is irrelevant for this scenario<BR><BR>Thanks<BR><BR>Augusto

  2. #2
    Join Date
    Dec 1969

    Default I think the reason you haven't...

    ...seen anything on this is because most sites would presume that, if you knew enough to be able to get data from a DB, you would know how to maintain another table in that same DB.<BR><BR>So let&#039;s say you are basing your display on some info coming from the form on the prior page. Maybe:<BR><BR>&#060;%<BR>SQL = "SELECT * FROM infotable WHERE userName=&#039;" & Request("userName") & "&#039;"<BR>Set RS = yourConnection.Execute(SQL)<BR>%&#062;<BR><BR>If that&#039;s what you are doing, then all you need is another table which has this layout:<BR><BR>Table: Counters<BR>-- userName : text (or might be foreign key to primary key of primary table?)<BR>-- count : integer<BR><BR>And then you just do:<BR><BR>&#060;%<BR>upSQL = "UPDATE Counters SET count=count + 1 WHERE userName=&#039;" & Request("UserName") & "&#039;"<BR>yourConnection.Execute( upSQL )<BR>%&#062;<BR><BR>If I&#039;ve completely missed the point of your request...and the more I read it again, the more I think maybe I have?...then please clarify when you ask again.<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts