Re: [PHP] MYSQL Query results in pages

2004-06-25 Thread Geethanandh Kandasamy
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

[PHP] R: [PHP] MYSQL Query results in pages

2004-06-25 Thread Alessandro Vitale
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

Re: [PHP] MYSQL Query results in pages

2004-06-24 Thread Matt Matijevich
[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

[PHP] MYSQL Query results in pages

2004-06-24 Thread Gus
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.