I wanted to make a simple chart out of my tblsearches - searchID, searchterm
I could use a bunch of cfquery's containing SELECT count(*)'s with WHERE's but
how would I build this dynamically, depending on what values where in
tblsearches.searchterm to start with?
Thanks,
Will
Will,
To get the number of times a term appears, try grouping by searchterm
and doing a COUNT() aggregate - then just do a CFChart bound to the
query.
-Joe
On 4/20/05, Will Tomlinson [EMAIL PROTECTED] wrote:
I wanted to make a simple chart out of my tblsearches - searchID, searchterm
I
Works like a champ Joe.
Thanks much!
Will
~|
Logware (www.logware.us): a new and convenient web-based time tracking
application. Start tracking and documenting hours spent on a project or with a
client with Logware today.
oh, and here's my final code in case it might help a newbie.
cfquery name=getsearches datasource=#DSN#
SELECT COUNT (*) AS thecount, searchterm
FROM tblsearches
GROUP BY searchterm
ORDER BY thecount DESC
/cfquery
The chart:
cfchart format=flash
backgroundcolor=##EE
chartheight=600
4 matches
Mail list logo