Nested CFQuery Uses Wrong Datasource
I'm using CF MX 7.0.2, and it's come to my attention that there is a problem with how CF handles nested queries. To illustrate it simply:
<cfquery name="insert" datasource="one">
<cfquery name="select" datasource="two">
select * from table
</cfquery>
insert into test values('blah')
</cfquery>
This set of code will attempt to insert the 'blah' value into datasource "two"! Not the expected "one". While this seems like a terrible way to make things, consider a more common scenario:
<cfquery name="insert" datasource="one">
insert into test values('#myfunction()#')
</cfquery>
<cffunction name="myfunction">
....
<cfquery name="select" datasource="two">
select * from table
</cfquery>
....
<cfreturn "blah">
</cffunction>
Again, this will attempt to insert into datasource "two". Please tell me there's a hotfix I can't find for this...
