![]() |
[AWW]
e-FUCKING-RASED : Damn it, I shouldn't let other people use my accounts. I know php damn it.
|
There is a limit clause to SQL queries that you can use if you're worried about efficiency. Obviously, you can use a count query to get the total number without the overhead of actually retreiving all of them.
|
Quote:
I know all about the LIMIT clause, but I've had a rather hard time coming up with a method of breaking them up properly. I believe it's a for statement I'm trying to do, but I'm failing to figure it out. Maybe, I can try to look at existing data and keep breaking it up from there. Hmm...maybe. Wait, no, I don't have it. AH! |
get the count of total results
number of pages=intval((total+perpage-1)/perpage) check that requested page is >0 and <=number of pages query the results LIMIT perpage*(pagenum-1),perpage post results display pagenav with pages 1 to number of pages |
All times are GMT -6. The time now is 11:40 AM. |
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
This site is best seen with your eyes open.