Skip to main content
Inspiring
May 26, 2008
Answered

vairable queryall undefined

  • May 26, 2008
  • 5 replies
  • 424 views
Sorry getting confused again here, why do i get this error? Do I have to use dot or array notation to output only one coloumn of the results? Thanks
This topic has been closed for replies.
Correct answer Hydrowizard
hang on I just worked it out I set the variable as <cfset localvariable=getall> and it works fine! thanks

5 replies

HydrowizardAuthorCorrect answer
Inspiring
May 26, 2008
hang on I just worked it out I set the variable as <cfset localvariable=getall> and it works fine! thanks
Inspiring
May 26, 2008
It says the method artname could not be found in component all. So that leads me to believe that I have to have methods set in my components?
I thought I could just output the returnvariable in this very simple component? I tried what you say where artname is a column in the cfquery results and i get the method artname could not be found:
<cfset localvariable=getall.artname()>

Why am I being so thick on this one?! I thought returnvariable returns the whole query back? Thanks
Inspiring
May 26, 2008
<cfobject name="abc" component="something">
<cfset localvariable = abc.somefunction()>
Inspiring
May 26, 2008
Hi Dan, thanks, I am cfreturning the queryall query from the function so why is it messing up? Could you give me an idiot's example what you mean? Thank-you
Inspiring
May 26, 2008
You have to run the function and assign whatever the function returns to a variable in your template.