RE: [PHP] Database Browsing
| From: | Sam Masiello | Date: | Mon, 03 Jul 2000 14:59:12 +0000 |
| Subject: | RE: [PHP] Database Browsing | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-4503@lists.php.net to get a copy of this message | ||
If you want to limit the number of records you receive by query, you can use
the LIMIT suffix with your query. For example, if you want to display the
first 5 records based on some certain criteria, you can do:
SELECT <fields> FROM <table> WHERE ... .. ... LIMIT 0,5
Or you can do:
SELECT <fields> FROM <table> WHERE ... .. .. ORDER BY <some_field_list>
LIMIT 0,5
Then if the user clicks that they want to see the next page, display your
records using:
SELECT <fields> FROM <table> WHERE ... .. .. ORDER BY <some_field_list>
LIMIT 6,10
Etc etc....perhaps control which group of results to show with some sort of
flag on your page which is modified depending on which group of results that
you want to display to your user.
Sam Masiello
System Analyst
Chek.Com
(716) 853-1362 x289
smasiello@chekinc.com
-----Original Message-----
From: Sean Mathews [mailto:smathews@dceg.com]
Sent: Monday, July 03, 2000 10:56 AM
To: php-general@lists.php.net
Subject: [PHP] Database Browsing
Hey Guys
I was wondering if anyone would be willing to provide some theory as to how
to implement database browsing (preferably without altering the structure of
the DB). You know like in a web server, where you can limit the number of
hits, and the browse them page by page.
Thx
Sean
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net