cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leszek Gawron <o...@vip.net.pl>
Subject Re: nested sql
Date Tue, 08 Apr 2003 14:26:39 GMT
On wto, kwi 08, 2003 at 03:18:19 +0100, Chris Pratt wrote:
> Still having issues with nested sql
> 
> Does </esql:results> close all the result sets?
> 
> If i have 4 queries one after another how do I do this?
One after another or 4 nested?

Both cases are possible :

<esql:connection>
<esql:pool>myPool</esql:pool>
<esql:execute-query>
	<esql:query>select * from sumthin</esql:query>
	<esql:results>
		<esql:row-results>
			<esql:get-columns/>
		</esql:row-results>
	</esql:results>
</esql:execute-query>
<esql:execute-query>
    <esql:query>select * from sumthin</esql:query>
    <esql:results>
        <esql:row-results>
            <esql:get-columns/>
        </esql:row-results>
    </esql:results>
</esql:execute-query>
<esql:execute-query>
    <esql:query>select * from sumthin</esql:query>
    <esql:results>
        <esql:row-results>
            <esql:get-columns/>
        </esql:row-results>
    </esql:results>
</esql:execute-query>
<esql:execute-query>
    <esql:query>select * from sumthin</esql:query>
    <esql:results>
        <esql:row-results>
            <esql:get-columns/>
        </esql:row-results>
    </esql:results>
</esql:execute-query>
</esql:connection>


and nesting queries:

<esql:connection>
<esql:pool>myPool</esql:pool>
<esql:execute-query>
    <esql:query>select * from sumthin</esql:query>
    <esql:results>
        <esql:row-results>

			<esql:execute-query>
			    <esql:query>select * from sumthin</esql:query>
			    <esql:results>
			        <esql:row-results>
			            <esql:get-columns/>
			        </esql:row-results>
			    </esql:results>
			</esql:execute-query>

        </esql:row-results>
    </esql:results>
</esql:execute-query>

regards
	LG

-- 
            __
         | /  \ |        Leszek Gawron            //  \\
        \_\\  //_/      ouzo@vip.net.pl          _\\()//_
         .'/()\'.     Phone: +48(600)341118     / //  \\ \
          \\  //  recursive: adj; see recursive  | \__/ |


Mime
View raw message