Counter for FAQ

Results 1 to 2 of 2

Thread: Counter for FAQ

  1. #1
    Cindy Guest

    Default Counter for FAQ

    Hi all,<BR>My company&#039;s web site has FAQ page which shows questions sorted by priority.<BR>Currently the priority is set manually in database and the web page reads it from db.<BR><BR>We&#039;re planning to change this way;<BR>1. Have a counter for each question.<BR>2. The questions hit most should be higher priority and the web page should display them with the new order.<BR><BR>How do I do that? Should I have a server variable for counter or write in a text file?<BR><BR>After I collect those counters, should I reset the db manually or there&#039;s a way to do it automatically?<BR><BR>Whatever way we choose, we don&#039;t want to slow down the loading speed of the page.<BR><BR>If you have any idea, advise or you know a similar page to do this, please let me know.<BR><BR>Thanks!!<BR>

  2. #2
    Steve Cimino Guest

    Default RE: Counter for FAQ

    You&#039;re already storing the question in the db, right? Just add a field called VIEWS. Then, when someone accesses it (in your SELECT), just do an update.<BR><BR>UPDATE yourtable<BR>SET [views] = [views] + 1<BR>WHERE question = yourquestion<BR><BR><BR>Simple. If you have stored procedures, you can do this all in one call.

Posting Permissions

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