cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Donald Ball <>
Subject Re: C2: recommended method for accessing Database, esp. for nested queries?
Date Fri, 15 Jun 2001 18:45:11 GMT
On Wed, 13 Jun 2001, [iso-8859-1] Götz Botterweck wrote:

> I'm already using the ESQL. Now I'd like to do nested queries. Somewhat
> like that
> 	retrieve departments
> 	FOR EACH department d
> 		retrieve all members of d
> I've seen the file ../docs/samples/sql/sql-page.xml with the
> <anchestor-value ... > tag. Is something similar possible with ESQL?


<?xml version="1.0"?>

<?cocoon-process type="xsp"?>



    <esql:query>select id,name from department_table</esql:query>
      <header>header info</header>
          <id><esql:get-int column="id"/></id>
          <name><esql:get-string column="name"/></name>
            <esql:query>select name from user_table where department_id = <esql:parameter
type="int"><esql:get-int ancestor="1" column="id"/></esql:parameter></esql:query>
                <user><esql:get-string column="name"/></user>
              <user>No employees</user>
      <footer>footer info</footer>



Please check that your question has not already been answered in the
FAQ before posting. <>

To unsubscribe, e-mail: <>
For additional commands, e-mail: <>

View raw message