cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fred.ts...@widelearning.com
Subject RE: [C2] esql: using query results in another query
Date Wed, 16 Jan 2002 18:57:04 GMT
Where do you embed the second query though? do u put it in the
esql:row-results element of the first query?

it seems to be ignoring the second query entirely.  I'm using the release
C2, with xmlns:esql="http://apache.org/cocoon/SQL/v2"

ie:
  <page>
    <content>
      <esql:connection>
        <esql:pool>pooledConnect</esql:pool>
        <esql:execute-query>
          <esql:query>
            select dept from department_table
          </esql:query>
          <esql:results>
            <esql:row-results>
              <list>
                <dept>
                <esql:get-string column="dept"/>
                </dept>
                <esql:execute-query>
                  <esql:query>
                    select id,name 
                    from employee_table 
                    where department_id = <esql:get-string column="dept"
ancestor="1"/>
                  </esql:query>
                  <esql:results>
                    <esql:row-results>
                      <employee>
                        <name><esql:get-string column="name"/></name>
                      </employee>
                    </esql:row-results>
                  </esql:results>
                  <esql:no-results>
                    <p>Sorry, no results 2!</p>
                  </esql:no-results>
                </esql:execute-query>
              </list>
            </esql:row-results>
          </esql:results>
          <esql:no-results>
            <p>Sorry, no results 1!</p>
          </esql:no-results>
        </esql:execute-query>
      </esql:connection>
    </content>
  </page>


-----Original Message-----
From: SunnyDay [mailto:sunnyday@rainyday.de]
Sent: 16 January 2002 16:03
To: cocoon-users@xml.apache.org
Subject: Re: [C2] esql: using query results in another query


<esql:get-string column="id" ancestor="1"/>

should work

CU
   Harald


Legal Disclaimer 

This message contains confidential information and is intended only for
the individual named.  If you are not the named addressee you should not
disseminate, distribute or copy this e-mail.  Please notify the sender
immediately by e-mail if you have received this e-mail by mistake and delete
this e-mail from your system.
mail transmission cannot be guaranteed to be secure or error-free as
information could be intercepted, corrupted, lost, destroyed, arrive late or
incomplete, or contain viruses.  The sender therefore does not accept
liability for any errors or omissions in the contents of this message that
arise as a result of e-mail transmission.  If verification is required
please request a hard-copy version.  This message is provided for
informational purposes only.
our website at: http://www.widelearning.com

Wide Learning is a trading name of Wide Multimedia Ltd Registered office:
33-41 Dallington Street, London EC1V 0BB
Company number: 3339664 VAT number: 690 8399 83


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message