Counting Rows - Pagination

1 view
Skip to first unread message

rnrstar

unread,
Sep 20, 2010, 12:29:08 AM9/20/10
to RISE
What's the easiest way to do pagination with RISE? I notice I can pass
"0,10" for example to the "$maxRowsToReturn" in the PHP generated List
function and that will give me a page of results. Is there a way to
get the number of rows without having to count each row from a List
method?

HOlsen

unread,
Sep 22, 2010, 6:51:02 AM9/22/10
to RISE
There are no generated methods that only return the number of hits.
You can always create a custom method that does this (see
http://www.risetobloome.com/Page_1_S_NodeListing.aspx?ITEM=814 for
more information), but the simplest solution is probably to execute
the query and count the rows you get.

Best regards,
RISE to Bloome Software

rnrstar

unread,
Sep 22, 2010, 3:36:48 PM9/22/10
to RISE
I found that I could simply use the php count() function to count the
rows in the array returned by a list method. I'm used to doing that
with a sql count statement and so I'm still getting used to the RISE
paradigm. I really like it so far as the changes in my programming
style have been minimal.

Thanks again.

rnrstar

unread,
Sep 22, 2010, 4:26:03 PM9/22/10
to RISE
Additionally, I found that I could pass something like "11,20" to the
"$maxRowsToReturn" argument. This allowed me to get back a page of
results.
Reply all
Reply to author
Forward
0 new messages