Thanks so much for your help, but the action page still does not work:( results of page#1 - http://dl.dropbox.com/u/1775689/page1.png result of page #2 - http://dl.dropbox.com/u/1775689/page2.png database - http://dl.dropbox.com/u/1775689/database.png
On the action page I want to get all the references & links for that topic area. I still don't get that data, I have no idea where I am going wrong :( any help getting this working would be so appreciated. thanks, John >See comments in code, hope this fixes it for you :) > ><!--- Page 1 ---> ><!--- code #1 (reference.cfm) this code works fine ---> ><cfparam name="URL.getTopic" default="1"> ><cfquery name="GetReferences" datasource="#REQUEST.dataSource#"> >SELECT * >FROM reference >ORDER BY topic ></cfquery> > ><h1><strong>References</strong></h1> ><cfoutput query="GetReferences" group="topic" groupcasesensitive="no"> ><!--- >Should this be GetReferences.topicID? I assume not because you have >cfqueryparam'd as varchar. >Because, if it's a string you may need to urlencodeformat the url variable >you are passing. >If you can use the topicID it might make life easier for you. >Encoded your line would read like this: ><a >href="reference_action.cfm?topics=#urlencodedformat(GetReferences.topic)#"> >---> ><a href="reference_action.cfm?topics=#GetReferences.topic#">#topic#<br /><br >/> ></cfoutput> > > ><!--- Page 2 ---> ><!--- the page I am having problens with(not showing data) is >reference_action.cfm(not working) ---> > ><cfparam name="URL.getTopic" default="1"> ><cfquery name="GetReferences" datasource="#REQUEST.dataSource#"> >SELECT * >FROM reference ><!--- then you would need to decode here, giving you: >WHERE topic = <cfqueryparam value="#urlDecode(URL.getTopic)#" >cfsqltype="CF_SQL_VARCHAR" >---> >WHERE topic = <cfqueryparam value="#URL.getTopic#" >cfsqltype="CF_SQL_VARCHAR"> ></cfquery> > > ><h1><strong>Topics</strong></h1> ><!--- I didn't see the need for a loop here ? And cfloops need to be inside >cfoutput ---> ><cfoutput query="GetReferences"> >#reference# <br /> ><a href="#reference_link#">#reference_link#</a> <br /> ><hr> ></cfoutput> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-newbie/message.cfm/messageid:5292 Subscription: http://www.houseoffusion.com/groups/cf-newbie/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-newbie/unsubscribe.cfm
