right i got a function where inside a queary i got a cfif statement, which displays an output of another query if hte statement is true. but i cannot get the it to work as coldfusion dont like nested queries. is there another way for this. thanks
I would run the first query and then if the other query statement is true, then I would run that one.
Then If the query statement was true I would write a query of queries to Join the two queries together, it it was false, then I would just use the results of the first query. Hope this helps
i done my structure similar to this, tell me if this is what you mean. EG. <cfoutput query switch> <cfif #content# eq 1> <cfoutput query 1> #1# #2# #3# </cfoutput> </cfoutput>
now is this what you mean if so then this dont work as you cant have nested queries
I meant to Query of Queries before the output. Get the information from using Query of Queries, and then output the Query of Query Results. <cfquery 1stQuery> <cfif #content# eq 1> <cfquery 2ndQuery> </cfif> <cfquery datasource="query" 3rdQuery> Do select and Join 1stQuery and 2ndQuuery </cfquery> <cfoutput> 3rdQuery </cfoutput>