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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sorting statsistics

Status
Not open for further replies.

Bramvg

IS-IT--Management
Joined
Jan 16, 2001
Messages
135
Location
BE
Hi,

I'm encountering 2 problems.


1. I have a database where I save browser info of my visitors.

Now I want to show a list of browser versions and a count of the use.
But how do I check the different versions?
e.g.: one is:

Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)
another is:
Mozilla/4.0 (compatible; MSIE 5.0; Windows NT 5.0)
Mozilla/4.0 (compatible; MSIE 5.0; Windows 98)
......

Not even speaking of Netscape ;-(

How can I 'group' my CFOUTPUT to get a list like:

MSIE 5.5 : 6users
MSIE 5.0 : 2users
.......



2. Sorting by date

In my database I store date info when they visited the website.But the SQL database stores them including time (which is necessary for other reasons).
When I want to 'print' a list of the nr. of persons who came today to the site I get a list of every date.

Because I do i GROUP BY date, but because of the minutes and the seconds it's everytime another date...


I thought: group by #dateformat("#date#", "dd/mm/yy")# but that doesn't work ;-(


Any suggestions? More than welcome

Regards
Bram






 
This script will give you quick browser info:


<cfset opera = FindNoCase(&quot;opera&quot;, http_user_agent)>
<cfset msie = FindNoCase(&quot;msie&quot;, http_user_agent)>
<cfif opera GT 0>
<cfset browVersion = Mid(http_user_agent, opera+6, 3)>
<cfif browVersion GE 5>
<cfset session.browser = &quot;IsOPERA&quot;>
<cfelse>
<cfset session.browser = &quot;IsOLD&quot;>
</cfif>

<cfelseif msie GT 0>
<cfset browVersion = Mid(http_user_agent, msie+5, 3)>
<cfif browVersion GE 4>
<cfset session.browser = &quot;IsIE&quot;>
<cfelse>
<cfset session.browser = &quot;IsOLD&quot;>
</cfif>

<cfelse>
<cfset browVersion = Mid(http_user_agent, 9, 3)>
<cfif browVersion GE 4.5>
<cfset session.browser = &quot;IsNN&quot;>
<cfelse>
<cfset session.browser = &quot;IsOLD&quot;>
</cfif>
</cfif>


if you need more detailed info go to:
you'll find cf_browser tag; that might be what you are looking for Sylvano
dsylvano@hotmail.com

&quot;every and each day when I learn something new is a small victory...&quot;
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Sponsor

Back
Top