|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
cfgrid problem
ok when i use cfgrid i have a problem, it doesnt show anything, what im trieing to do is show the number of clicks per IP address stored in my database, here is the code i have:
Code:
<cfquery name="clicks" blockfactor="100" datasource="#datasourcename#">
SELECT ID, ipnumber
FROM clicks
</cfquery>
<table width="100%" border="0" cellspacing="0" cellpadding="3">
<cfoutput>
<tr>
<td width="50" align="center" bgcolor="488BE2" class="welcome"><strong>ID</strong></td>
<td width="250" bgcolor="488BE2" class="welcome"><strong>IP Address</strong></td>
<td width="100" bgcolor="488BE2" class="welcome"><strong>Total Clicks:</strong> #clicks.recordcount#</td>
</tr>
</cfoutput>
<tr>
<td align="center" colspan="3">
<cfgraph type="HorizontalBar"
query="clicks"
valueColumn="ipnumber"
itemColumn="ipnumber"
showValueLabel="rollover"
graphHeight="450"
graphWidth="500"
depth="3"
title="Total Clicks by IP Address">
</cfgraph>
</td>
</tr>
</table>
|
|
#2
|
|||
|
|||
|
I think you must be talking about cfgraph, not cfgrid? cfgraph has been depricated, graphs are created with cfchart on CFMX (assuming you're on CFMX)? I'd check the relevant documentation:
http://livedocs.macromedia.com/cold...g.htm#wp1156498
__________________
Ask if you have a question, but also help answer questions that you have knowledge of! Thanks, Brian. How to Post a Question in the Forums |
|
#3
|
||||
|
||||
|
yeah cfgraph, my fault, im not on cfmx this time, the customer has opted out for paying extra for cfmx, i based my code on that documentation but for some reason its not coming up
|
|
#4
|
|||
|
|||
|
|
|
#5
|
||||
|
||||
|
ok ok i see my problem now, but how would i go about gathering a recordcount of each IP that is entered into the db??
|
|
#6
|
|||
|
|||
|
That sounds like a separate issue from the graph problem. But you probably want to look at the count() aggregate SQL function.
|
|
#7
|
||||
|
||||
|
i just opted to redo my database and part of my code so it adds up the clicks when it updates the database...
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ColdFusion Development > cfgrid problem |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|