INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Common Operations

PHPDIG Monthly Stats by BiJae
Posted: 17 Apr 07

I've recently Installed PHPDIG on my web server. It uses a MySql database to collect the information. The current release only gives its stats as total results. I am interested in seeing what people are looking at on my site, over time, so I can drive the information I provide them. So I developed this query to give me a quick and easy monthly snapshot of search terms:

CODE


SELECT l_includes, count(l_includes) as l_count
FROM logs
WHERE l_ts >= '2007-04-17'
AND l_ts <= '2007-04-30'
AND l_includes != ""
group by l_includes
order by l_count desc

The query will return a list of search terms ranked by the number of times that term was used for the dates entered in the query:

Quote (PHPMyAdmin):


l_includes              l_count
escrow                  3
job postings            2
investment rules        1
job posting             1
real estate             1

I've saved this query to my monthly task list in Outlook. When the reminder comes up I copy the query, change the dates and execute.

Back to MySQL FAQ Index
Back to MySQL Forum

My Archive

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close