Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread filtering a specific number of records in a query
Thu, Sep 28 2006 7:21 AMPermanent Link

"Andre"
Hi,

I use PHP 5 and DBISAM 4.24 database server with the latest ODBC driver.

When I make a query I get maybe over a 500 records. If I want to display
those records on a webpage it becomes slow. So I want them to break up in
groups of 25 records.

Can I put in a query that I only want record 1 till 25 (offset=1) or 26 till
50 (offset=26) or 451 till 475 (offset=451).
Or do I have to run the query and skip a the offset number of records.

Thanks
Andre

Thu, Sep 28 2006 1:09 PMPermanent Link

"Jose Eduardo Helminsky"
Andre

You have made the question and give the answer.

> Can I put in a query that I only want record 1 till 25 (offset=1) or 26
> till 50 (offset=26) or 451 till 475 (offset=451).
> Or do I have to run the query and skip a the offset number of records.

You should run the query and skip some records

Query.Open;
Query.MoveBy((NumberOfRecordsPerPage+1) * (PageNumber-1));

Eduardo

Mon, Oct 2 2006 7:17 AMPermanent Link

"Andre"
thanks eduardo.

"Jose Eduardo Helminsky" <contato@hpro.com.br> schreef in bericht
news:B7387E34-66B1-4672-A852-37C32941A199@news.elevatesoft.com...
> Andre
>
> You have made the question and give the answer.
>
>> Can I put in a query that I only want record 1 till 25 (offset=1) or 26
>> till 50 (offset=26) or 451 till 475 (offset=451).
>> Or do I have to run the query and skip a the offset number of records.
>
> You should run the query and skip some records
>
> Query.Open;
> Query.MoveBy((NumberOfRecordsPerPage+1) * (PageNumber-1));
>
> Eduardo
>

Image