Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PHPDIG Monthly Stats

Common Operations

PHPDIG Monthly Stats

by  BiJae  Posted    (Edited  )
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
[/quote]

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.
Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top