Page 1 of 1

Listing files in a directory - 50 / page

Posted: Mon Mar 03, 2008 11:21 am
by jkashu
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

Posted: Mon Mar 03, 2008 12:26 pm
by kryles
use the SQL LIMIT and OFFSET to get the right values from the query.

I'm a little too :banghead: 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 =/

Re: Listing files in a directory - 50 / page

Posted: Mon Mar 03, 2008 12:46 pm
by Christopher
Search these forums for "pagination". There are a couple of pagination classes in Code Snippets.