See comments in code!

Make sure you have debug mode turned on in CF Admin so you can see exactly
what is going on.

<!--- Page 1 --->
<cfparam name="URL.getTopic" type="string">
<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">
<a
href="reference_action.cfm?topics=#urlencodedformat(GetReferences.topic)#">#
topic#<br /><br />
<!--- examine data --->
#urlencodedformat(GetReferences.topic)#
</cfoutput>

<!--- Page 2 --->

<!--- this will show you everything in the url scope --->
<cfdump var="#url#">

<!--- after this works add this code
<cfif not isdefined("url.topic")>
<cflocation url="reference1.cfm">
</cfif>
--->

<!--- remove the cfqueryparm for testing and fully describe the .topic in
the sql --->

<cfquery name="checkQuery" datasource="#REQUEST.dataSource#">
SELECT *
FROM reference
</cfquery>

<!--- run a check on the query and dump the results --->
<cfdump var="#checkquery#">

<cfparam name="URL.getTopic" type="string">
<cfquery name="GetReferences" datasource="#REQUEST.dataSource#">
SELECT *
FROM reference
WHERE reference.topic = '#urlDecode(URL.getTopic)#'
</cfquery>

<h1><strong>Topics</strong></h1>
<cfoutput query="GetReferences">
#reference# <br />
<a href="#reference_link#">#reference_link#</a> <br />
<hr>
</cfoutput>


>>-----Original Message-----
>>From: John Barrett [mailto:[email protected]]
>>Sent: 13 June 2011 04:13
>>To: cf-newbie
>>Subject: Re: url params
>>
>>
>>
>>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.
>>



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:5293
Subscription: http://www.houseoffusion.com/groups/cf-newbie/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-newbie/unsubscribe.cfm

Reply via email to