cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremy Quinn <>
Subject Re: SQLTransformer modifications
Date Thu, 06 Mar 2003 11:01:48 GMT

On Wednesday, March 5, 2003, at 05:15 PM, Irv Salisbury III wrote:

> We'd like to use paging in our application from the result sets 
> returned from the SQLTransformer.  However, with a number of our 
> queries returning 20,000+ rows, it seems like the current Paginator 
> will not cut it for us.  This is mainly because it looks like the 
> Paginator expects all of the data to be there, which we don't want it 
> to be.

I just use the LIMIT statement in my SQL Query:

<component xmlns="">
		<desc>gets the list of audiocd format</desc>
	<chapter type="publications">
		<execute-query xmlns="" 
			<query name="count-paging">
				SELECT COUNT(id) AS total
				FROM library_resource
				WHERE format = 15
		<execute-query xmlns="" 
			<query name="publications">
				SELECT id AS 'libraryid', title, YEAR(pubyear) AS 'date', 
description AS 'desc'
				FROM library_resource
				WHERE format = 15
				ORDER BY r.title
				LIMIT <substitute-value sql:name="start"/>,<substitute-value 

Then some XSLT turns the 'count-paging' query into a bunch of links to 
each 'page' of results.

I use InputModules in the Sitemap for the parameters 'start' and 
'count', which have default values (0 and 25) that can be overridden by 
request parameters.

hope this helps

regards Jeremy

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message