Listing files in a directory - 50 / page
Moderator: General Moderators
Listing files in a directory - 50 / page
I need to list the files in a directory such that the listing shows 50 files and then you can hit "next page" to go to the next 50 files... I can list ALL the files on one page easilly, but what is the best way to list 50 per page?? Would I GET the range of files for each page (ie listing.php?start=1&end=50 )?? Thanks!
Re: Listing files in a directory - 50 / page
use the SQL LIMIT and OFFSET to get the right values from the query.
I'm a little too
to get it all working, but that may start you on the right path.....
Edit: Wow directories.....ok this probably wasn't helpful at all then, I assumed right away it was a query. Sorry =/
I'm a little too
Edit: Wow directories.....ok this probably wasn't helpful at all then, I assumed right away it was a query. Sorry =/
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: Listing files in a directory - 50 / page
Search these forums for "pagination". There are a couple of pagination classes in Code Snippets.
(#10850)