cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Donald Ball <ba...@webslingerZ.com>
Subject Re: SQL question: suggestions welcome...
Date Thu, 21 Sep 2000 04:00:39 GMT
On Wed, 20 Sep 2000, Alfredas Chmieliauskas wrote:

> 
> Hi,
> 
> I have two SQL queries in one page, one of which has to return the general
> info about the page (last edited, absolute location, author, etc)  the other
> query has to form a links menu in a page according to the result of the
> previous (eg. that every "author" could see his "own" menu).
> <page>
> .................
> <query connection="mysql_connection" doc-element="page_info"
> row-element="info">
> 	select title, context, page_author, date_edited, page_background
> from page_info
> </query>
> <query connection="mysql_connection" doc-element="page_menu"
> row-element="menu_item">
> 	select item_name, item_link, item_author, item_image from page_menu
> where item_author=.......(how to pass the value page_author from the
> previous query, if it is possible???).....
> </query>
> ...............
> </page>

try using xsp and the new esql logicsheet - it lets you do nested queries
and lets the inner queries refer to the results of the outer
queries. there's an example in samples/sql/esql.xml.

- donald


Mime
View raw message