You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Bruno PIERRE <br...@yahoo.fr> on 2003/07/17 18:48:15 UTC

problem with sql transform

Hello,

I've got a problem with sql transformer and embeded request.
I have a table GROUPS
and a table L_GROUPS_USER
and a table L_GROUPS_RIGHTS

I want to get in one request the users and the rights from all groups

such a code with embedded request works :
<page xmlns:sql="http://apache.org/cocoon/SQL/2.0">
  <execute-query xmlns="http://apache.org/cocoon/SQL/2.0">
    <query>
      select GROUPS_ID,name from GROUPS
    </query>
    <execute-query>
      <query>
        select user_id from L_GROUPS_USER where GROUPS_ID= <ancestor-value
sql:name="groups_id" sql:level="1"/>
      </query>
    </execute-query>
  </execute-query>
</page>

But whe i embed two request at the same level it blows!
like here :
<page xmlns:sql="http://apache.org/cocoon/SQL/2.0">
  <execute-query xmlns="http://apache.org/cocoon/SQL/2.0">
    <query>
      select GROUPS_ID,name from GROUPS
    </query>
    <execute-query>
      <query>
        select user_id from L_GROUPS_USER where GROUPS_ID= <ancestor-value
sql:name="groups_id" sql:level="1"/>
      </query>
   </execute-query>
   <execute-query>
      <query>
         select rights_id from L_GROUPS_RIGHTS where GROUPS_ID=
<ancestor-value sql:name="groups_id" sql:level="1"/>
      </query>
    </execute-query>
  </execute-query>
</page>


Does it work with esql?
Is there a way to use esql instead sql (without generating an xsp with esql
tag and executing it)

Thanks,
Bruno


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