No other way. Use one query to count the total record and then another
query for limiting
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Query results in pages
[snip]
Is this right? Is there other efficent way to do it?
What about if data changes (i.e. new records are added) while the user
browses through pages?
[/snip]
on each page do a:
SELECT count(*) FROM table WHERE your_condition
this will give you your total number of
[snip]
Is this right? Is there other efficent way to do it?
What about if data changes (i.e. new records are added) while the user
browses through pages?
[/snip]
on each page do a:
SELECT count(*) FROM table WHERE your_condition
this will give you your total number of results
--
PHP General Ma
Hi. I want to query some data in MYSQL and show the results in page order in
some fashion (ORDER BY ...)
I've been using the LIMIT sentence like this
LIMIT offset, max_per_page
so if max_per_page = 5 then the first time the sentence will be "LIMIT 0,
5", in page 2 "LIMIT 5,5" and so no.
4 matches
Mail list logo