I'm trying to find out (first in a series of steps) who went where in on my
site. 
Yes I could use webanalyser for this step. :-)

I need to do multiple queries in which the only thing that changes is the
WHERE statement and then manipulate the results.
There must be a better way than seperate queries to find

1. the total number of page hits
2. the total number of page hits in a particular directory

I could easily have 20 or 30 of these queries. 


<!--- My code follows --->


<cfquery name="totalRows" datasource="webdata">

        select count(*) as total
        from main

</cfquery>
<cfquery name="marketData" datasource="webdata">        

        select count(*) as marketData
        from main
        where this_page LIKE 'marketData%'
</cfquery>



<cfoutput query="totalRows"><cfset totalRows=#total#></cfoutput>
<cfoutput query="marketData"><cfset marketData=#marketData#></cfoutput>


<cfoutput>

        <cfset percentageMarketData=#marketData#/#totalRows#*100>

        #totalRows#<br>
        #marketData#<br>
        #percentageMarketData#

</cfoutput>



______________________________________________________________________
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to