cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mauro Velasco" <mvelas...@hotmail.com>
Subject Re: ESQL - select * from any_table
Date Mon, 06 Aug 2001 19:41:46 GMT
Thanx again Chris, I'll try this now..



From: Christian Haul <haul@dvs1.informatik.tu-darmstadt.de>
Reply-To: haul@informatik.tu-darmstadt.de
To: Mauro Velasco <mvelasco9@hotmail.com>
Subject: Re: ESQL - select * from any_table
Date: Mon, 6 Aug 2001 19:26:50 +0200
MIME-Version: 1.0
Received: from [130.83.126.41] by hotmail.com (3.2) with ESMTP id 
MHotMailBD381E5C00A8400438E682537E2990450; Mon, 06 Aug 2001 10:26:53 -0700
Received: from london (london.dvs1.informatik.tu-darmstadt.de 
[130.83.27.27])by mailserver1.hrz.tu-darmstadt.de (8.9.1a/8.9.1) with ESMTP 
id TAA20372for <mvelasco9@hotmail.com>; Mon, 6 Aug 2001 19:25:47 +0200 (MET 
DST)
Received: by london (Postfix, from userid 11012)id 21B0316487; Mon,  6 Aug 
2001 19:26:51 +0200 (MET DST)
>From haul@dvs1.informatik.tu-darmstadt.de Mon, 06 Aug 2001 10:28:34 -0700
Message-ID: <20010806192650.A15751@london.dvs1.informatik.tu-darmstadt.de>
References: <LAW2-F388dyDd3OJXsN00002a09@hotmail.com>
User-Agent: Mutt/1.2i
In-Reply-To: <LAW2-F388dyDd3OJXsN00002a09@hotmail.com>; from 
mvelasco9@hotmail.com on Mon, Aug 06, 2001 at 11:43:25AM -0500
Organization: Databases and Distributed Systems Group, Darmstadt University 
of Technology

On 06.Aug.2001 -- 11:43 AM, Mauro Velasco wrote:
 > Thanks Chris for answer.
 >
 > Exist a way to know the number of columns to be retrieved for a esql 
query
 > (typically a select * from table_name) and how can i pass it to the 
columns
 > definition. Or can suggest my a way to make this query on tomcat cocoon
 > environment..

Yes, <esql:get-column-count/> does it. Thus

      <esql:row-results>
         <tr>
            <xsp:logic>
	      for (int i=0; i &lt; <esql:get-column-count/>; i++) {
		 <td><esql:get-column><esql:param 
name="column"><xsp:expr>i</xsp:expr></esql:param/></td>
               }
            </xsp:logic>
	</tr>
      </esql:row-results>

would output all columns in a table. But for this you could also do

      <esql:row-results>
         <tr>
	   <esql:get-columns/>
	</tr>
      </esql:row-results>

which would produce a similar result (not the same, as ex.2 does not
use <td/> tags but column names... so the result would need to be
transformed properly)

	Chris.

--
C h r i s t i a n       H a u l
haul@informatik.tu-darmstadt.de
     fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08


_________________________________________________________________
Descargue GRATUITAMENTE MSN Explorer en http://explorer.msn.es/intl.asp


---------------------------------------------------------------------
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