You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Ling Kok Choon <ko...@brel.com> on 2002/01/03 03:22:33 UTC
Re: sql query
Hi,
you may try to use xsp and the esql taglib :
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsp:page
language="java"
xmlns:xsp="http://apache.org/xsp"
xmlns:esql="http://apache.org/cocoon/SQL/v2"
>
<esql:connection>
<esql:pool>tpConnection</esql:pool>
<esql:execute-query>
<esql:query>SELECT GROUP_ID, LABEL, PATH FROM GROUP_EXT</esql:query>
<esql:results>
<esql:row-results>
<xsp:logic>
int group_id = <esql:get-int column="GROUP_ID"/>;
String label = <esql:get-string column="LABEL"/>;
String group_path = <esql:get-string column="PATH"/>;
String result = getSelectedIndex ( group_path );
if ( uri.equals(result.concat(".xml")) )
{
//System.out.println("path:" + path );
requestedIndex = group_id;
}
</xsp:logic>
</esql:row-results>
</esql:results>
<esql:no-results>
<xsp:logic>System.out.println("First: No result");</xsp:logic>
</esql:no-results>
</esql:execute-query>
</esql:connection>
</xsp:page>
for more information, please visit : http://xml.apache.org/cocoon/userdocs/xsp/esql.html
hth,
regards,
Kok Choon.
--------------------------------------------------------
Name: Ling Kok Choon
E-mail: Ling Kok Choon <ko...@brel.com>
Date: 01/03/02
Time: 10:22:32
This message was sent by Z-Mail Pro - from NetManage
NetManage - delivers Standards Based IntraNet Solutions
--------------------------------------------------------
---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>