how can i use the paging in any php page
By 1anurag1
@1anurag1 (3576)
India
September 9, 2009 1:03pm CST
i want to show the data from the data base but the problem is that if there are big number of rows then i want data to be shown in paging
how to do this php.
1 response
@sleuth (37)
• Philippines
9 Sep 09
create your own function for paging or look for paging examples of web. i cannot provide you tutorials on this because it's prohibited here.hehehe. the idea is like this...
1.set the default value for the page(obviously, it's 1)
2.set the number of rows to be displayed(for example if you wanted to display 10 items per page then put 10)
3.count the offset by this equation offset=(page number-1)* number of rows to be displayed
4.your select statement must be SELECT columns from table LIMIT offset, number of rows to be displayed.
if you needed other examples then use search engines. i really hope i had given you a brief idea on your task.