MegaSack DRAW - This year's winner is user - rgwb
We will be in touch
I've got a simple page that returns results from a mysql search but the results are not paginated yet.
I could figure out how to do this but it would take time as I'm not a very good at it, and I've got a potential client looking at it very very soon.
Anybody fancy chucking some code into it to paginate the results or pointing me at some code that I could use?
Cheers Nemesis - seen that one, I'll take a look.
I'm not a php guy but it'll be pretty trivial to write your own version. You need three numbers: The number of results you want to show (n), the page number you're on (p) and the total number of results (t).
Use LIMIT n , n*(p-1) in the sql to get the results and use ceil(t/n) to get the total number of pages. Quick for x < numberOfPages loop to render the paging links and bob's your uncle.
nemesis - MemberPie chart anyone?
SO reminded me of this (which may have been on STW years ago)
It has a few sweary bits – but it’s good
I Wish I Worked With This Man...He's Hilarious
PHP threads are never as funny as Photoshop threads... 🙁
I've got a potential client looking at it very very soon.
So you have a potential client but haven't yet figured out how to limit the number of results from an SQL query? Are you sure you're doing things in the right order? 😯
