You probably could use "esql:row-results//esql:get-row-position" But i
think you can only show the count at the end this way
if you declare a variable countrecords
<xsp:logic>int countrecords = 0;</xsp:logic>
<esql:results>
<table>
<esql:row-results>
<xsp:logic>countrecords = <esql:get-row-position/>;</xsp:logic>
<esql:previous-results>previous rows
available</esql:previous-results>
<esql:more-results>more rows available</esql:more-results>
<tr>
<td><esql:get-string column="mycolumn1"/></td>
<td><esql:get-string column="mycolumn2"/></td>
</tr>
</esql:row-results>
<row>Total number of records in set is
<xsp:expr>countrecords</xsp:expr></row>
</table>
</esql:results>
Or something similar... i never tried it before....
-----Original Message-----
From: olivier demah [mailto:[EMAIL PROTECTED]
Sent: 27mm2004 16:57
To: [EMAIL PROTECTED]
Subject: Re: esql row count
Anna Bikkina a �crit :
>Hi,
>
>I am trying to get the count of number of rows returned in a query using
esql.
>Is there something like esql:get-row-count.
>
>Any idea how I can get the number of rows using esql.
>
>
>
you might find something here
http://cocoon.apache.org/2.1/userdocs/xsp/esql.html
or may be a simple SELECT count(*) as total FROM table ....
and then
<total><esql:get-int column="total"/></total>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]