Andy Jarrett // Code. Develop. Create.

CFC and QoQ

I ran into an odd problem today. I was trying to do a Query of a Query (QoQ) in a CFC function, from a query ran in another function.When it came to testing the page CFMX returned that it could not find the first query in memory. So i did some playing and set upa function to just check if the query existed with the following code in there

TRUE
FALSE


Then right after calling this method i put the same code in my CF page. So it looked like:

  1. - this holds the
  2. TRUE
    FALSE


When i ran the page the returned result was:
FALSE
TRUE

All i can see is that i will need to assign the "this" scope to the originalQuery so that it can be seen through the CFC.Though i havent got time to test it now (its the weekend WooHoo) i'll look into it later unless anyone knows the reason why?

I’m here, learning and working away. If you liked this content and want to keep me going, consider buying me a coffee. Your support keeps this site running and the coffee brewing! ☕️