Page 1 of 1

dispalying data per page

Posted: Tue Feb 17, 2004 1:41 am
by softsolvers
hello friends
i like to display the data as the user inputs e.g. if user choose 10 per page then the page contents should change and the data should being displayed according to the page,same for the choosing 20/50 etc.
can u people help me

Posted: Tue Feb 17, 2004 6:02 am
by markbeadle
This topic has already been discussed within the forums... you could perform a search :wink:

To sum up if you are using a database you could use limit and offset within your SQL statement.

SELECT select_list
FROM table_expression
[LIMIT { number | ALL }] [OFFSET number]


(That is in POSTGRESQL).

Hope that helps

Posted: Tue Feb 17, 2004 5:03 pm
by DuFF
It's called "pagination". Check out this tutorial for some help:

http://www.phpfreaks.com/tutorials/43/0.php

Posted: Tue Feb 17, 2004 5:21 pm
by mikegotnaild
Yessum.. That is what i need to learn as well. :)