Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9038101
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T09:24:30+00:00 2026-06-16T09:24:30+00:00

I have a page that shows data from my database. Before the user sees

  • 0

I have a page that shows data from my database. Before the user sees the data they have a few select boxes so they can choose to filter the data in a number of different ways eg to chose to show data over a certain period of time. and the url looks similar to the below as I am using the get method.

http://www.example/com?report=2&days=7&etc=2

This all works fine and the users can filter the data to get the different results that they want. I have been viewing my analytics account and can see that some queries are more popular than others. How can I let the users know which queries are the most popular (eg most viewed over the last 24 hours). Currently I have made a manual html table that I update in the morning based on the Analytics data.

eg

<table>
<tbody>
<tr><th>query</th><th>link</th></tr>
<tr><td>Show data from last 7 days</td><td><a href="http://www.example/com?report=2&days=7&etc=2">View</a></td></tr>
</tbody>
</table>

I thought about adding a table called count which has id, query, timestamp and saying

$a='report=';
$b=$_SERVER['QUERY_STRING'];
if($b == $a . $report['id'])
{}
else
{//Insert id, query, timestamp into the database}

This way I can do a count for a certain time period on queries that have the additional sorting paremeters. Is this the best way to acheive this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T09:24:31+00:00Added an answer on June 16, 2026 at 9:24 am

    Create a table that stores the query-part of the url and the timestamp. It needs no other fields as you’ll get a running sum of the latest calls.

    Then get something like

    select url, 
           count(*) as reqs 
      from queries 
     where ts > now() - interval 24 hour 
     group by url 
     order by reqs desc
    

    to get the most requested urls for the last 24 hours.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a main page with a Gridview that shows data from a Database.
I have a Gridview within an UpdatePanel that shows some data from my Database.
I have a MFMailViewController that shows what the user answered on the previous page.
I have a repeater which fetches data from a database and shows some labels
I have an index page which shows a paged list of data from a
I have a PHP script that extract valid GeoJSON data from a database. Now
I have a jsp page where data are displayed directly from mysql Database. Due
I have a page that shows statistics for users, this cannot be cached because
I have a work page that shows all projects. I am using a taxonomy
I have a page ItemList that shows a list of items using div's. After

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.