This content has been marked as final. Show 3 replies
Lucky Kitty wrote:
> Is it possible to use a value returned in query number one in query number two
> as the "where"? For example, Box Number is returned in query number one, and
> I want to query again for additional information based upon the box number.
Yeah, it is just a variable and can be used as anyplace another variable
can be used.
But when one is doing this kind of thing at least 8 out of 10 times, it
can be done with a single query with a proper join.
While that works, it has the performance hit of using 2 cfquery tags with 2 separate requests to the database.
I don't know what database that you are using, but you may wish to investigate either using a JOIN or a sub-query. Either of these would generally be more efficient.