Specify startrow and endrow instead of page numbers?

Hi All,

I am “attempting” to use the SmartClient JavaScript front-end for an application I’m developing in Yii for the back-end.

The way smartclient does pagination is by loading sets of records (ie "give me rows 0 - 50", rather than giving a page number or even an offset and limit.

Currently I am loading the full record set from the search (which pay or may not contain filters) and searching through (via PHP arrays) the rows to only return rows between the startRow and endRow to the client via JSON.

I know this definitely not the best approach as it’s putting unnecessary load on the database server, but I’m not sure the best way to implement. Can anyone offer any guidance or approaches?

Thanks

Use SQL "select * from table limit 0, 50" for your case.