RE: [PHP-DB] Limite display results
| From: | Rick Emery | Date: | Tue, 06 Nov 2001 13:49:23 +0000 |
| Subject: | RE: [PHP-DB] Limite display results | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-14048@lists.php.net to get a copy of this message | ||
Easiest method: Just pass the current location from one page to the next
page in arguments in the URL.
PHP example link: print " <A
href=\"listing_page.php3?loc=$current_loc\">Next</A>
Then, upon reaching the listing_page.php3, calculate the next location and
read the database from tha point:
example:
$new_loc = $loc + 50;
$query = "SELECT * FROM mytable WHERE some_condition LIMIT $new_loc,50"
mysql_query($query) or die("error: ".mysql_error() );
-----Original Message-----
From: Fabrizio Tivano [mailto:fabrizio@sad.it]
Sent: Tuesday, November 06, 2001 3:20 AM
To: php-db@lists.php.net
Subject: [PHP-DB] Limite display results
Hello to all,
I'm working around a web-based utility witch display a result of MySQL
query:
sometimes its possible to see a very big result, many many rows!
Any idea how to let php display only a first part of the result and then
next? (ex. first 50 row and then next 50)
thanks in advance,
fabrizio
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
For additional commands, e-mail: php-db-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net