I changed the insert query to use:
'#ListLast(cgi.path_info, "/")#'
and now it only inserts the page name alone, which
seems to be a solid solution...
Issues?
Rick
-----Original Message-----
From: Rick Faircloth [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 10, 2004 9:30 PM
To: CF-Talk
Subject: How to change this query to get only last part of URL...
How would I change this query to get just the page name after the last
"/"...
<CFQUERY Name="GetTotalIndividualPageVisits" Datasource="#DSN#">
Select page, Sum(clicks) as Click_Sum
from sitestats S
group by page
order by Click_Sum desc
</CFQUERY>
For the display, I can use:
ListLast(GetDailyPageVisits.page, "/")
but when the stats are being collected by the Insert query,
page URL's are going into the database differently...as in,
"cfdocs/holtzman/index.cfm"
and sometimes just:
"/index.cfm"
and it's throwing off the counts to visits of each page, with pages
being listed more than once...
The different URL's are probably because of the way the links are
coded in various parts of the site...
Rick
--
Outgoing mail is certified Virus Free.
Checked by AVG Anti-Virus (http://www.grisoft.com).
Version: 7.0.211 / Virus Database: 261.8.4 - Release Date: 2/9/2004
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

