954,585 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Variable problem

Hi CF People
I have a query:

<cfquery name="getspecial" datasource="#dsn#"> 
SELECT ID, category, product, special 
FROM products 
WHERE special = 'Yes' 
</cfquery>


If i do a cfdump of this query it shows that ??? is the category.

However when i try asnd use this variable in a url link back to another page:

<cfoutput>#getspecial.category#</cfoutput>

I gat an error; that Element CATEGORY is undefined in GETSPECIAL.

How can this be if the category is selected in the query how come i cant then use it as a link variable

any help would be appreciated
cheers and thanks in advance
Grabit

Read more: http://www.easycfm.com/coldfusion/forums/viewmessages.cfm?Forum=12&Topic=15163#ixzz1Oj4yo4LE

grabit
Newbie Poster
13 posts since Sep 2009
Reputation Points: 10
Solved Threads: 0
 
However when i try asnd use this variable in a url link back to another page:


Queries do not go from page to page. If you need information to be passed to another page set the variables as session variables or pass the unique id as the URL variable and query the database where id = #url.id#.

cfwebdeveloper
Junior Poster in Training
78 posts since May 2011
Reputation Points: 19
Solved Threads: 8
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You