Rodrigo,

We had this problem too. We solved it by doing 2 queries. There might be a better way, 
but this is what we do.

<cfquery name="getUserTicketCount">
SELECT id
FROM Tickets
</cfquery>
<cfquery>
SELECT *
FROM Tickets
WHERE id >= #ListGetAt(ValueList(getUserTicketCount.id), MyBeginningRow)# AND
T.ticketID <= #ListGetAt(ValueList(getUserTicketCount.id), MyEndRow)#
</cfquery>

We first get the number of rows that we have. That is the first query. Then the second 
query simple checks the ID of wherever we want to be in the list. So for example, if 
your first query returns
1,2,3,4,7,8,9,10

you could set MyBeginningRow to say 3, MyEndRow to say 8, and the second query then 
returns the info for the id's 3,4,7,8. Again, there may be better ways to do this, and 
I've trimmed down the queries to be simple, but that is the basic idea.

If anyone else has better suggestions, go ahead.

Cedric
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
http://www.cfhosting.com

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to